diff options
Diffstat (limited to 'weed/command')
| -rw-r--r-- | weed/command/fuse.go | 28 | ||||
| -rw-r--r-- | weed/command/upload.go | 2 | ||||
| -rw-r--r-- | weed/command/volume.go | 2 |
3 files changed, 16 insertions, 16 deletions
diff --git a/weed/command/fuse.go b/weed/command/fuse.go index 09dec388f..ac306876a 100644 --- a/weed/command/fuse.go +++ b/weed/command/fuse.go @@ -2,10 +2,10 @@ package command import ( "fmt" - "strings" + "os" "strconv" + "strings" "time" - "os" ) func init() { @@ -13,7 +13,7 @@ func init() { } type parameter struct { - name string + name string value string } @@ -42,7 +42,7 @@ func runFuse(cmd *Command, args []string) bool { option.Reset() } - // dash separator read option until next space + // dash separator read option until next space } else if rawArgs[i] == '-' { for i++; i < rawArgsLen && rawArgs[i] != ' '; i++ { option.WriteByte(rawArgs[i]) @@ -50,7 +50,7 @@ func runFuse(cmd *Command, args []string) bool { options = append(options, parameter{option.String(), "true"}) option.Reset() - // equal separator start option with pending value + // equal separator start option with pending value } else if rawArgs[i] == '=' { name := option.String() option.Reset() @@ -62,13 +62,13 @@ func runFuse(cmd *Command, args []string) bool { option.WriteByte(rawArgs[i]) } - // single quote separator read option until next single quote + // single quote separator read option until next single quote } else if rawArgs[i] == '\'' { for i++; i < rawArgsLen && rawArgs[i] != '\''; i++ { option.WriteByte(rawArgs[i]) } - // add chars before comma + // add chars before comma } else if rawArgs[i] != ' ' { option.WriteByte(rawArgs[i]) } @@ -77,12 +77,12 @@ func runFuse(cmd *Command, args []string) bool { options = append(options, parameter{name, option.String()}) option.Reset() - // comma separator just read current option + // comma separator just read current option } else if rawArgs[i] == ',' { options = append(options, parameter{option.String(), "true"}) option.Reset() - // what is not a separator fill option buffer + // what is not a separator fill option buffer } else { option.WriteByte(rawArgs[i]) } @@ -99,7 +99,7 @@ func runFuse(cmd *Command, args []string) bool { for i := 0; i < len(options); i++ { parameter := options[i] - switch parameter.name { + switch parameter.name { case "child": masterProcess = false case "arg0": @@ -198,9 +198,9 @@ func runFuse(cmd *Command, args []string) bool { arg0 := os.Args[0] argv := append(os.Args, "-o", "child") - attr := os.ProcAttr{} - attr.Env = os.Environ() - + attr := os.ProcAttr{} + attr.Env = os.Environ() + child, err := os.StartProcess(arg0, argv, &attr) if err != nil { @@ -232,7 +232,7 @@ func runFuse(cmd *Command, args []string) bool { var cmdFuse = &Command{ UsageLine: "fuse /mnt/mount/point -o \"filer=localhost:8888,filer.path=/\"", - Short: "Allow use weed with linux's mount command", + Short: "Allow use weed with linux's mount command", Long: `Allow use weed with linux's mount command You can use -t weed on mount command: diff --git a/weed/command/upload.go b/weed/command/upload.go index a102796b4..ccdec561f 100644 --- a/weed/command/upload.go +++ b/weed/command/upload.go @@ -110,7 +110,7 @@ func runUpload(cmd *Command, args []string) bool { }) if err != nil { fmt.Println(err.Error()) - return false; + return false } } else { parts, e := operation.NewFileParts(args) diff --git a/weed/command/volume.go b/weed/command/volume.go index fe75e9e91..ced6ec414 100644 --- a/weed/command/volume.go +++ b/weed/command/volume.go @@ -51,7 +51,7 @@ type VolumeServerOptions struct { indexType *string diskType *string fixJpgOrientation *bool - readMode *string + readMode *string cpuProfile *string memProfile *string compactionMBPerSecond *int |
