diff options
Diffstat (limited to 'weed-fs/src/pkg/util/parse.go')
| -rw-r--r-- | weed-fs/src/pkg/util/parse.go | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/weed-fs/src/pkg/util/parse.go b/weed-fs/src/pkg/util/parse.go index 930da9522..6a4350e72 100644 --- a/weed-fs/src/pkg/util/parse.go +++ b/weed-fs/src/pkg/util/parse.go @@ -1,16 +1,16 @@ package util import ( - "strconv" + "strconv" ) -func ParseInt(text string, defaultValue int) int { - count, parseError := strconv.ParseUint(text, 10, 64) - if parseError != nil { - if len(text) > 0 { - return 0 - } - return defaultValue - } - return int(count) +func ParseInt(text string, defaultValue int) int{ + count, parseError := strconv.ParseUint(text,10,64) + if parseError!=nil { + if len(text)>0{ + return 0 + } + return defaultValue + } + return int(count) } |
