Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanUpdate ¶
func CanUpdate(v interface{}) bool
CanUpdate returns true when the given value is an initial value of its type
Types ¶
type OtherStruct ¶
type Sample ¶
type Sample struct { Name string `default:"John Smith"` Age int `default:"27"` Gender Gender `default:"m"` Slice []string `default:"[]"` SliceByJSON []int `default:"[1, 2, 3]"` // Supports JSON Map map[string]int `default:"{}"` MapByJSON map[string]int `default:"{\"foo\": 123}"` Struct OtherStruct `default:"{}"` StructPtr *OtherStruct `default:"{\"Foo\": 123}"` NoTag OtherStruct // Recurses into a nested struct by default OptOut OtherStruct `default:"-"` // Opt-out }
Click to show internal directories.
Click to hide internal directories.