Skip to content

Commit

Permalink
Remove superfluous nil check. (#512)
Browse files Browse the repository at this point in the history
  • Loading branch information
wenovus authored Mar 25, 2021
1 parent 25f3c35 commit 318cf86
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions ygen/goelements.go
Original file line number Diff line number Diff line change
Expand Up @@ -596,9 +596,6 @@ func (s *goGenState) yangDefaultValueToGo(value string, args resolveTypeArgs, is
return nil, yang.Ynone, fmt.Errorf("default value conversion: %q doesn't match int restrictions: %v", value, err)
}
}
if err != nil {
return nil, yang.Ynone, fmt.Errorf("default value conversion: unable to convert default value %q to %v: %v", value, ykind, err)
}
return &value, ykind, nil
case yang.Ydecimal64:
val, err := strconv.ParseFloat(value, 64)
Expand Down

0 comments on commit 318cf86

Please sign in to comment.