diff options
author | ᴜɴᴋɴᴡᴏɴ <u@gogs.io> | 2021-05-19 13:38:13 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-19 13:38:13 +0800 |
commit | 1a1a01a8423a58c2c9f4906364631b160ec593eb (patch) | |
tree | 76da60be7bd2e332b91171d0b1c342928284e846 /internal/db | |
parent | c4cf659e324379dba29c78d6e838dfebe6b59e2f (diff) |
ci: use new lint action and add custom config (#6562)
Diffstat (limited to 'internal/db')
-rw-r--r-- | internal/db/action.go | 2 | ||||
-rw-r--r-- | internal/db/models.go | 2 | ||||
-rw-r--r-- | internal/db/ssh_key.go | 2 | ||||
-rw-r--r-- | internal/db/webhook.go | 2 | ||||
-rw-r--r-- | internal/db/webhook_dingtalk.go | 2 | ||||
-rw-r--r-- | internal/db/webhook_discord.go | 2 | ||||
-rw-r--r-- | internal/db/webhook_slack.go | 2 |
7 files changed, 7 insertions, 7 deletions
diff --git a/internal/db/action.go b/internal/db/action.go index b44af9c7..292e936a 100644 --- a/internal/db/action.go +++ b/internal/db/action.go @@ -11,7 +11,7 @@ import ( "time" "unicode" - "github.com/json-iterator/go" + jsoniter "github.com/json-iterator/go" "github.com/unknwon/com" log "unknwon.dev/clog/v2" "xorm.io/xorm" diff --git a/internal/db/models.go b/internal/db/models.go index f80cad92..3c2b6280 100644 --- a/internal/db/models.go +++ b/internal/db/models.go @@ -227,7 +227,7 @@ func GetStatistic() (stats Statistic) { stats.Counter.HookTask, _ = x.Count(new(HookTask)) stats.Counter.Team, _ = x.Count(new(Team)) stats.Counter.Attachment, _ = x.Count(new(Attachment)) - return + return stats } func Ping() error { diff --git a/internal/db/ssh_key.go b/internal/db/ssh_key.go index 379c5b1d..2f783a9f 100644 --- a/internal/db/ssh_key.go +++ b/internal/db/ssh_key.go @@ -221,7 +221,7 @@ func SSHKeyGenParsePublicKey(key string) (string, int, error) { func SSHNativeParsePublicKey(keyLine string) (string, int, error) { fields := strings.Fields(keyLine) if len(fields) < 2 { - return "", 0, fmt.Errorf("not enough fields in public key line: %s", string(keyLine)) + return "", 0, fmt.Errorf("not enough fields in public key line: %s", keyLine) } raw, err := base64.StdEncoding.DecodeString(fields[1]) diff --git a/internal/db/webhook.go b/internal/db/webhook.go index 61602ef9..457fa6cb 100644 --- a/internal/db/webhook.go +++ b/internal/db/webhook.go @@ -14,7 +14,7 @@ import ( "strings" "time" - "github.com/json-iterator/go" + jsoniter "github.com/json-iterator/go" gouuid "github.com/satori/go.uuid" log "unknwon.dev/clog/v2" "xorm.io/xorm" diff --git a/internal/db/webhook_dingtalk.go b/internal/db/webhook_dingtalk.go index e747ae14..13287f5e 100644 --- a/internal/db/webhook_dingtalk.go +++ b/internal/db/webhook_dingtalk.go @@ -8,7 +8,7 @@ import ( "fmt" "strings" - "github.com/json-iterator/go" + jsoniter "github.com/json-iterator/go" "github.com/gogs/git-module" api "github.com/gogs/go-gogs-client" diff --git a/internal/db/webhook_discord.go b/internal/db/webhook_discord.go index 4725f867..f149b11e 100644 --- a/internal/db/webhook_discord.go +++ b/internal/db/webhook_discord.go @@ -9,7 +9,7 @@ import ( "strconv" "strings" - "github.com/json-iterator/go" + jsoniter "github.com/json-iterator/go" "github.com/gogs/git-module" api "github.com/gogs/go-gogs-client" diff --git a/internal/db/webhook_slack.go b/internal/db/webhook_slack.go index f824e9bc..a42fb8d8 100644 --- a/internal/db/webhook_slack.go +++ b/internal/db/webhook_slack.go @@ -8,7 +8,7 @@ import ( "fmt" "strings" - "github.com/json-iterator/go" + jsoniter "github.com/json-iterator/go" "github.com/gogs/git-module" api "github.com/gogs/go-gogs-client" |