From b2568a7cd26ac8ecfb3187faa7286dce2dd4f27f Mon Sep 17 00:00:00 2001 From: Ivaylo Petrov Date: Thu, 19 May 2016 14:41:15 +0200 Subject: [PATCH] Fix some methods' descriptions to match code --- field.go | 5 ++--- structs.go | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) 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) {