Fix some methods' descriptions to match code

This commit is contained in:
Ivaylo Petrov 2016-05-19 14:41:15 +02:00
parent 24f3e1df2f
commit b2568a7cd2
2 changed files with 3 additions and 4 deletions

View File

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

View File

@ -283,7 +283,7 @@ func (s *Struct) Field(name string) *Field {
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
// was found.
func (s *Struct) FieldOk(name string) (*Field, bool) {