aboutsummaryrefslogtreecommitdiff
path: root/weed-fs/src/pkg/util/parse.go
diff options
context:
space:
mode:
authorTamás Gulácsi <tgulacsi78+waterhouse@gmail.com>2013-01-05 23:06:44 +0100
committerTamás Gulácsi <tgulacsi78+waterhouse@gmail.com>2013-01-05 23:06:44 +0100
commit5d2a1e8d4845e7a7f1dccd962bb0ee6a5f9d6081 (patch)
tree7fb36c1ab3b11e0e3267417c1ebbaf0ef5466a82 /weed-fs/src/pkg/util/parse.go
parent824371035109225128f8942b64a817838a7c0c25 (diff)
downloadseaweedfs-5d2a1e8d4845e7a7f1dccd962bb0ee6a5f9d6081.tar.xz
seaweedfs-5d2a1e8d4845e7a7f1dccd962bb0ee6a5f9d6081.zip
add cmd/dump - a dumper
Walk needed to be added to NeedleMap and CompactMap, to be able to add WalkKeys and WalkValues to volume. This is needed for iterating through all the stored needles in a volume - this was dump's purpose.
Diffstat (limited to 'weed-fs/src/pkg/util/parse.go')
-rw-r--r--weed-fs/src/pkg/util/parse.go20
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 6a4350e72..930da9522 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)
}