Skip to content

Commit

Permalink
clean up docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles Banning committed Nov 29, 2016
1 parent fc60367 commit 6786ea1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,11 @@ var skipmembers = []skipmems{}

// SetMembersToIgnore creates a list of exported struct member names that should not be checked
// for as keys in the JSON object. For hierarchical struct members provide the full path for
// the member name using dot-notation. Calling SetMembersToIgnore with no arguments -
// the member name using dot-notation. Calling SetMembersToIgnore with no arguments -
// SetMembersToIgnore() - will clear the list.
func SetMembersToIgnore(s ...string) {
if len(s) == 0 {
skipmembers = skipmembers[:0] // remove "config"
skipmembers = skipmembers[:0]
return
}
skipmembers = make([]skipmems, len(s))
Expand Down Expand Up @@ -355,7 +355,6 @@ func checkMembers(mv interface{}, val reflect.Value, s *[]string, cmem string) e
for _, field := range fields {
lm := strings.ToLower(field.name)
for _, sm := range skipmembers {
// strip off leading dot-notation per cmem
// skip any skipmembers values that aren't at same depth
if cmemdepth != sm.depth {
continue
Expand Down

0 comments on commit 6786ea1

Please sign in to comment.