fix golint issues

This commit is contained in:
kevin
2020-10-16 10:50:43 +08:00
parent 338caf9927
commit 94645481b1
27 changed files with 73 additions and 88 deletions

View File

@@ -18,8 +18,6 @@ const (
ServiceTypeRmq ServiceType = "rmq"
ServiceTypeSync ServiceType = "sync"
envDev = "dev"
envPre = "pre"
envPro = "pro"
)
type (

View File

@@ -9,7 +9,7 @@ import (
)
const (
none = iota
_ = iota
primary
unique
normal

View File

@@ -53,9 +53,7 @@ func (s String) ToCamel() string {
// camel->snake
func (s String) ToSnake() string {
list := s.splitBy(func(r rune) bool {
return unicode.IsUpper(r)
}, false)
list := s.splitBy(unicode.IsUpper, false)
var target []string
for _, item := range list {
target = append(target, From(item).Lower())