diff options
Diffstat (limited to 'vendor/github.com/spf13/viper/util.go')
| -rw-r--r-- | vendor/github.com/spf13/viper/util.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/vendor/github.com/spf13/viper/util.go b/vendor/github.com/spf13/viper/util.go index 2a08074bc..d08ed4621 100644 --- a/vendor/github.com/spf13/viper/util.go +++ b/vendor/github.com/spf13/viper/util.go @@ -174,10 +174,7 @@ func parseSizeInBytes(sizeStr string) uint { } } - size := cast.ToInt(sizeStr) - if size < 0 { - size = 0 - } + size := max(cast.ToInt(sizeStr), 0) return safeMul(uint(size), multiplier) } |
