diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2016-11-24 15:04:31 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-24 15:04:31 +0800 |
commit | 3917ed45de063b4e8868610c82d8172020d572fd (patch) | |
tree | 052b7651cbb64ae30f92efe87441ad1d4fa2d922 /routers/api/v1/org/org.go | |
parent | 3a3782bb7fed768c1e832ff4c0a77f2f5281ed05 (diff) | |
download | gitea-3917ed45de063b4e8868610c82d8172020d572fd.tar.gz gitea-3917ed45de063b4e8868610c82d8172020d572fd.zip |
golint fixed for routers (#208)
Diffstat (limited to 'routers/api/v1/org/org.go')
-rw-r--r-- | routers/api/v1/org/org.go | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/routers/api/v1/org/org.go b/routers/api/v1/org/org.go index cc847af8db..328b97a223 100644 --- a/routers/api/v1/org/org.go +++ b/routers/api/v1/org/org.go @@ -26,12 +26,14 @@ func listUserOrgs(ctx *context.APIContext, u *models.User, all bool) { ctx.JSON(200, &apiOrgs) } -// https://github.com/gogits/go-gogs-client/wiki/Organizations#list-your-organizations +// ListMyOrgs list all my orgs +// see https://github.com/gogits/go-gogs-client/wiki/Organizations#list-your-organizations func ListMyOrgs(ctx *context.APIContext) { listUserOrgs(ctx, ctx.User, true) } -// https://github.com/gogits/go-gogs-client/wiki/Organizations#list-user-organizations +// ListUserOrgs list user's orgs +// see https://github.com/gogits/go-gogs-client/wiki/Organizations#list-user-organizations func ListUserOrgs(ctx *context.APIContext) { u := user.GetUserByParams(ctx) if ctx.Written() { @@ -40,12 +42,14 @@ func ListUserOrgs(ctx *context.APIContext) { listUserOrgs(ctx, u, false) } -// https://github.com/gogits/go-gogs-client/wiki/Organizations#get-an-organization +// Get get an organization +// see https://github.com/gogits/go-gogs-client/wiki/Organizations#get-an-organization func Get(ctx *context.APIContext) { ctx.JSON(200, convert.ToOrganization(ctx.Org.Organization)) } -// https://github.com/gogits/go-gogs-client/wiki/Organizations#edit-an-organization +// Edit change an organization's information +// see https://github.com/gogits/go-gogs-client/wiki/Organizations#edit-an-organization func Edit(ctx *context.APIContext, form api.EditOrgOption) { org := ctx.Org.Organization if !org.IsOwnedBy(ctx.User.ID) { |