diff --git a/field.go b/field.go index c803d5c..ad705f0 100644 --- a/field.go +++ b/field.go @@ -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() diff --git a/structs.go b/structs.go index b88ec62..39eb083 100644 --- a/structs.go +++ b/structs.go @@ -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) {