mirror of
https://github.com/charlienet/go-mixed.git
synced 2025-07-18 08:32:40 +08:00
oops
This commit is contained in:
@ -7,6 +7,7 @@ import (
|
||||
type optionFunc func(*option)
|
||||
|
||||
type option struct {
|
||||
SkipFields []string
|
||||
TagName string
|
||||
DeepCopy bool
|
||||
Omitempty bool
|
||||
@ -39,6 +40,18 @@ func DeepCopy() optionFunc {
|
||||
}
|
||||
}
|
||||
|
||||
func SkipField(field string) optionFunc {
|
||||
return func(o *option) {
|
||||
o.SkipFields = append(o.SkipFields, field)
|
||||
}
|
||||
}
|
||||
|
||||
func SkipFields(fields []string) optionFunc {
|
||||
return func(o *option) {
|
||||
o.SkipFields = append(o.SkipFields, fields...)
|
||||
}
|
||||
}
|
||||
|
||||
func Lcfirst() optionFunc {
|
||||
return func(o *option) {
|
||||
o.NameConverter = json.Lcfirst
|
||||
|
Reference in New Issue
Block a user