fix golint issues
This commit is contained in:
@@ -18,8 +18,6 @@ const (
|
||||
ServiceTypeRmq ServiceType = "rmq"
|
||||
ServiceTypeSync ServiceType = "sync"
|
||||
envDev = "dev"
|
||||
envPre = "pre"
|
||||
envPro = "pro"
|
||||
)
|
||||
|
||||
type (
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
none = iota
|
||||
_ = iota
|
||||
primary
|
||||
unique
|
||||
normal
|
||||
|
||||
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user