Merge pull request #52 from Acklio/fix-godoc

Fix some methods' descriptions to match code
This commit is contained in:
Fatih Arslan 2016-05-19 16:57:51 +03:00
commit fe6055a020
2 changed files with 3 additions and 4 deletions

View File

@ -114,9 +114,8 @@ func (f *Field) Field(name string) *Field {
return field return field
} }
// Field returns the field from a nested struct. The boolean returns true if // FieldOk returns the field from a nested struct. The boolean returns whether
// the field was found. It panics if the nested struct is not exported or if // the field was found (true) or not (false).
// the field was not found.
func (f *Field) FieldOk(name string) (*Field, bool) { func (f *Field) FieldOk(name string) (*Field, bool) {
v := strctVal(f.value.Interface()) v := strctVal(f.value.Interface())
t := v.Type() t := v.Type()

View File

@ -283,7 +283,7 @@ func (s *Struct) Field(name string) *Field {
return f return f
} }
// Field returns a new Field struct that provides several high level functions // FieldOk returns a new Field struct that provides several high level functions
// around a single struct field entity. The boolean returns true if the field // around a single struct field entity. The boolean returns true if the field
// was found. // was found.
func (s *Struct) FieldOk(name string) (*Field, bool) { func (s *Struct) FieldOk(name string) (*Field, bool) {