aboutsummaryrefslogtreecommitdiff
path: root/internal/route/api/v1/repo
diff options
context:
space:
mode:
authorᴜɴᴋɴᴡᴏɴ <u@gogs.io>2021-05-19 13:38:13 +0800
committerGitHub <noreply@github.com>2021-05-19 13:38:13 +0800
commit1a1a01a8423a58c2c9f4906364631b160ec593eb (patch)
tree76da60be7bd2e332b91171d0b1c342928284e846 /internal/route/api/v1/repo
parentc4cf659e324379dba29c78d6e838dfebe6b59e2f (diff)
ci: use new lint action and add custom config (#6562)
Diffstat (limited to 'internal/route/api/v1/repo')
-rw-r--r--internal/route/api/v1/repo/branch.go4
-rw-r--r--internal/route/api/v1/repo/hook.go5
2 files changed, 5 insertions, 4 deletions
diff --git a/internal/route/api/v1/repo/branch.go b/internal/route/api/v1/repo/branch.go
index 3ddf62cc..eb19c657 100644
--- a/internal/route/api/v1/repo/branch.go
+++ b/internal/route/api/v1/repo/branch.go
@@ -25,7 +25,7 @@ func GetBranch(c *context.APIContext) {
return
}
- c.JSONSuccess( convert.ToBranch(branch, commit))
+ c.JSONSuccess(convert.ToBranch(branch, commit))
}
// https://github.com/gogs/go-gogs-client/wiki/Repositories#list-branches
@@ -46,5 +46,5 @@ func ListBranches(c *context.APIContext) {
apiBranches[i] = convert.ToBranch(branches[i], commit)
}
- c.JSONSuccess( &apiBranches)
+ c.JSONSuccess(&apiBranches)
}
diff --git a/internal/route/api/v1/repo/hook.go b/internal/route/api/v1/repo/hook.go
index d5730165..6aa3feb5 100644
--- a/internal/route/api/v1/repo/hook.go
+++ b/internal/route/api/v1/repo/hook.go
@@ -7,11 +7,12 @@ package repo
import (
"net/http"
- api "github.com/gogs/go-gogs-client"
- "github.com/json-iterator/go"
+ jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
"github.com/unknwon/com"
+ api "github.com/gogs/go-gogs-client"
+
"gogs.io/gogs/internal/context"
"gogs.io/gogs/internal/db"
"gogs.io/gogs/internal/route/api/v1/convert"