Merge pull request #121 from rgorsuch/master

Minor clarification in the README
This commit is contained in:
Fatih Arslan 2018-09-14 12:55:22 +03:00 committed by GitHub
commit 4966fc68f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -81,8 +81,8 @@ n := s.Names() // Get a []string
f := s.Field(name) // Get a *Field based on the given field name f := s.Field(name) // Get a *Field based on the given field name
f, ok := s.FieldOk(name) // Get a *Field based on the given field name f, ok := s.FieldOk(name) // Get a *Field based on the given field name
n := s.Name() // Get the struct name n := s.Name() // Get the struct name
h := s.HasZero() // Check if any field is initialized h := s.HasZero() // Check if any field is uninitialized
z := s.IsZero() // Check if all fields are initialized z := s.IsZero() // Check if all fields are uninitialized
``` ```
### Field methods ### Field methods