Structs: fix documentation

This commit is contained in:
Cihangir SAVAS 2014-08-17 02:51:18 -07:00
parent 852670f7c6
commit 995f03a605

View File

@ -85,13 +85,14 @@ func (f *Field) Set(val interface{}) error {
return nil
}
// Fields returns a slice of Fields. A struct tag with the content of "-"
// ignores the checking of that particular field. Example:
// Fields returns a slice of Fields. This is particular handy to get the fields
// of a nested struct . A struct tag with the content of "-" ignores the
// checking of that particular field. Example:
//
// // Field is ignored by this package.
// Field bool `structs:"-"`
// Field *http.Request `structs:"-"`
//
// It panics if s's kind is not struct.
// It panics if field is not exported or if field's kind is not struct
func (f *Field) Fields() []*Field {
return getFields(f.value)
}