diff --git a/gogs.go b/gogs.go index f7c0f68..70c272d 100644 --- a/gogs.go +++ b/gogs.go @@ -14,7 +14,7 @@ import ( ) func Version() string { - return "0.1.0" + return "0.3.0" } // Client represents a Gogs API client. diff --git a/miscellaneous.go b/miscellaneous.go new file mode 100644 index 0000000..fcf362c --- /dev/null +++ b/miscellaneous.go @@ -0,0 +1,11 @@ +// Copyright 2015 The Gogs Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package gogs + +type MarkdownOption struct { + Text string + Mode string + Context string +} diff --git a/user_app.go b/user_app.go index 152492b..965ed6e 100644 --- a/user_app.go +++ b/user_app.go @@ -29,7 +29,7 @@ func (c *Client) ListAccessTokens(user, pass string) ([]*AccessToken, error) { } type CreateAccessTokenOption struct { - Name string `json:"name"` + Name string `json:"name" binding:"Required"` } func (c *Client) CreateAccessToken(user, pass string, opt CreateAccessTokenOption) (*AccessToken, error) {