fix: 解决golint 部分警告 (#897)

* feat:  解决goreportcard的警报
ps: warning: if block ends with a return statement, so drop this else and outdent its block (golint)

* feat: 优化golint警告,将processFieldPrimitiveWithJsonNumber 改成 processFieldPrimitiveWithJSONNumber
unmarshaler.go:248:23: method processFieldPrimitiveWithJsonNumber should be processFieldPrimitiveWithJSONNumber

* feat: 添加 WithCanonicalKeyFunc 注释

* feat: 添加DisableStat的注释

* feat: 添加 RegisterGoctlHome 注释

* feat: 添加 PostgreSqlJoin 注释

* feat: 解决goline警告should not use basic type string as key in context.WithValue问题

* feat: 解决golint警告信息: should not use basic type string as key in context.WithValue

* fix: 定义自定义字段类型,导致go test fail 问题

* update: 恢复原有测试用例

* fix golint warning
This commit is contained in:
市民233
2021-08-11 17:57:20 +08:00
committed by GitHub
parent cc264dcf55
commit 0b0406f41a
6 changed files with 14 additions and 4 deletions

View File

@@ -121,6 +121,7 @@ func RawFieldNames(in interface{}, postgresSql ...bool) []string {
return out
}
//PostgreSqlJoin concatenate the given elements into a string
func PostgreSqlJoin(elems []string) string {
b := new(strings.Builder)
for index, e := range elems {