diff options
author | ᴜɴᴋɴᴡᴏɴ <u@gogs.io> | 2020-03-01 14:55:03 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-01 14:55:03 +0800 |
commit | f04b2d43509816ecfda93aa5d0d1fd685d9b860f (patch) | |
tree | 548c7b0b4ff2f187569e74cf99c19742a44f18aa /internal/route/api/v1/user | |
parent | 9c65798902386341a205d52b6b3842e1dc2c751a (diff) |
lint: fix some Golang CI lint issues (#5955)
Diffstat (limited to 'internal/route/api/v1/user')
-rw-r--r-- | internal/route/api/v1/user/app.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/route/api/v1/user/app.go b/internal/route/api/v1/user/app.go index 5db0175b..fdf11c09 100644 --- a/internal/route/api/v1/user/app.go +++ b/internal/route/api/v1/user/app.go @@ -23,7 +23,7 @@ func ListAccessTokens(c *context.APIContext) { apiTokens := make([]*api.AccessToken, len(tokens)) for i := range tokens { - apiTokens[i] = &api.AccessToken{tokens[i].Name, tokens[i].Sha1} + apiTokens[i] = &api.AccessToken{Name: tokens[i].Name, Sha1: tokens[i].Sha1} } c.JSONSuccess(&apiTokens) } @@ -41,5 +41,5 @@ func CreateAccessToken(c *context.APIContext, form api.CreateAccessTokenOption) } return } - c.JSON(http.StatusCreated, &api.AccessToken{t.Name, t.Sha1}) + c.JSON(http.StatusCreated, &api.AccessToken{Name: t.Name, Sha1: t.Sha1}) } |