Update README.md

This commit is contained in:
Fatih Arslan 2014-08-05 17:01:25 +03:00
parent 241e969210
commit 13b7095115

View File

@ -51,12 +51,12 @@ n := structure.Name(s)
// => true // => true
h := structure.Has(s, "Enabled") 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) { if structure.HasZero(s) {
fmt.Println("s has a zero value field") 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) { if structure.IsZero(s) {
fmt.Println("all fields of s is zero value") fmt.Println("all fields of s is zero value")
} }