aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chris.lu@uber.com>2021-04-10 23:48:18 -0700
committerChris Lu <chris.lu@uber.com>2021-04-10 23:48:18 -0700
commitf62c1532745c1dca7d81f1f23d39f18f5c8985d5 (patch)
treef3844277a6d004c50bb9c5dddc4315843f3570c8
parentaf313dff58bf82a731dbce72535b72f1979d6740 (diff)
downloadseaweedfs-f62c1532745c1dca7d81f1f23d39f18f5c8985d5.tar.xz
seaweedfs-f62c1532745c1dca7d81f1f23d39f18f5c8985d5.zip
go fmt
-rw-r--r--weed/command/gateway.go6
-rw-r--r--weed/filesys/dir.go1
-rw-r--r--weed/operation/upload_content.go2
-rw-r--r--weed/util/http_util.go1
4 files changed, 4 insertions, 6 deletions
diff --git a/weed/command/gateway.go b/weed/command/gateway.go
index a2a97889f..28ec326cc 100644
--- a/weed/command/gateway.go
+++ b/weed/command/gateway.go
@@ -68,9 +68,9 @@ func (gw *GatewayOptions) startGateway() {
defaultMux := http.NewServeMux()
_, gws_err := weed_server.NewGatewayServer(defaultMux, &weed_server.GatewayOption{
- Masters: strings.Split(*gw.masters, ","),
- Filers: strings.Split(*gw.filers, ","),
- MaxMB: *gw.maxMB,
+ Masters: strings.Split(*gw.masters, ","),
+ Filers: strings.Split(*gw.filers, ","),
+ MaxMB: *gw.maxMB,
})
if gws_err != nil {
glog.Fatalf("Gateway startup error: %v", gws_err)
diff --git a/weed/filesys/dir.go b/weed/filesys/dir.go
index 46457f858..7b918e769 100644
--- a/weed/filesys/dir.go
+++ b/weed/filesys/dir.go
@@ -372,7 +372,6 @@ func (dir *Dir) Remove(ctx context.Context, req *fuse.RemoveRequest) error {
return fuse.EPERM
}
-
if !req.Dir {
return dir.removeOneFile(req)
}
diff --git a/weed/operation/upload_content.go b/weed/operation/upload_content.go
index 40e96fd8c..7a7f8aa0c 100644
--- a/weed/operation/upload_content.go
+++ b/weed/operation/upload_content.go
@@ -235,7 +235,7 @@ func upload_content(uploadUrl string, fillBufferFunction func(w io.Writer) error
// print("+")
resp, post_err := HttpClient.Do(req)
if post_err != nil {
- if !strings.Contains(post_err.Error(), "connection reset by peer"){
+ if !strings.Contains(post_err.Error(), "connection reset by peer") {
glog.Errorf("upload %s %d bytes to %v: %v", filename, originalDataSize, uploadUrl, post_err)
debug.PrintStack()
}
diff --git a/weed/util/http_util.go b/weed/util/http_util.go
index 1c1b2b377..1630760b1 100644
--- a/weed/util/http_util.go
+++ b/weed/util/http_util.go
@@ -145,7 +145,6 @@ func DeleteProxied(url string, jwt string) (body []byte, httpStatus int, err err
return
}
-
func GetBufferStream(url string, values url.Values, allocatedBytes []byte, eachBuffer func([]byte)) error {
r, err := client.PostForm(url, values)
if err != nil {