Skip to content

Commit

Permalink
Merge pull request #4 from ianlancetaylor/99-iszero
Browse files Browse the repository at this point in the history
getSingleImpl: don't check whether a map value is zero
  • Loading branch information
casualjim committed Aug 2, 2019
2 parents a105a90 + de6c4fe commit a67b0cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pointer.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func getSingleImpl(node interface{}, decodedToken string, nameProvider *swag.Nam
kv := reflect.ValueOf(decodedToken)
mv := rValue.MapIndex(kv)

if mv.IsValid() && !swag.IsZero(mv) {
if mv.IsValid() {
return mv.Interface(), kind, nil
}
return nil, kind, fmt.Errorf("object has no key %q", decodedToken)
Expand Down

0 comments on commit a67b0cd

Please sign in to comment.