Update README.md
This commit is contained in:
parent
241e969210
commit
13b7095115
@ -51,12 +51,12 @@ n := structure.Name(s)
|
||||
// => true
|
||||
h := structure.Has(s, "Enabled")
|
||||
|
||||
// Check if a field of a struct is initialized or not.
|
||||
// Check if any field of a struct is initialized or not.
|
||||
if structure.HasZero(s) {
|
||||
fmt.Println("s has a zero value field")
|
||||
}
|
||||
|
||||
// Check if all field of a struct is initialized or not.
|
||||
// Check if all fields of a struct is initialized or not.
|
||||
if structure.IsZero(s) {
|
||||
fmt.Println("all fields of s is zero value")
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user