diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-11-15 16:59:28 -0800 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-11-15 16:59:28 -0800 |
| commit | 0ea5c087ce8414e2fc6a0d470d316bac7fd1167b (patch) | |
| tree | 5c6f0e56759c80a3b446ab29b84d46660e49276f /weed/server | |
| parent | 95c0de285d907cbd826ba6ce97f7c4994c16ffd5 (diff) | |
| download | seaweedfs-0ea5c087ce8414e2fc6a0d470d316bac7fd1167b.tar.xz seaweedfs-0ea5c087ce8414e2fc6a0d470d316bac7fd1167b.zip | |
go fmt
Diffstat (limited to 'weed/server')
| -rw-r--r-- | weed/server/filer_server_handlers.go | 4 | ||||
| -rw-r--r-- | weed/server/filer_server_handlers_write.go | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/weed/server/filer_server_handlers.go b/weed/server/filer_server_handlers.go index a64b23927..451e2a2de 100644 --- a/weed/server/filer_server_handlers.go +++ b/weed/server/filer_server_handlers.go @@ -27,7 +27,7 @@ func (fs *FilerServer) filerHandler(w http.ResponseWriter, r *http.Request) { case "DELETE": stats.FilerRequestCounter.WithLabelValues("delete").Inc() if _, ok := r.URL.Query()["tagging"]; ok { - fs.DeleteTaggingHandler(w,r) + fs.DeleteTaggingHandler(w, r) } else { fs.DeleteHandler(w, r) } @@ -35,7 +35,7 @@ func (fs *FilerServer) filerHandler(w http.ResponseWriter, r *http.Request) { case "PUT": stats.FilerRequestCounter.WithLabelValues("put").Inc() if _, ok := r.URL.Query()["tagging"]; ok { - fs.PutTaggingHandler(w,r) + fs.PutTaggingHandler(w, r) } else { fs.PostHandler(w, r) } diff --git a/weed/server/filer_server_handlers_write.go b/weed/server/filer_server_handlers_write.go index 0344d84dc..5806b0c1f 100644 --- a/weed/server/filer_server_handlers_write.go +++ b/weed/server/filer_server_handlers_write.go @@ -103,7 +103,7 @@ func (fs *FilerServer) DeleteHandler(w http.ResponseWriter, r *http.Request) { w.WriteHeader(http.StatusNoContent) } -func (fs *FilerServer) detectStorageOption(requestURI, qCollection, qReplication string, ttlSeconds int32, dataCenter, rack string) (*operation.StorageOption) { +func (fs *FilerServer) detectStorageOption(requestURI, qCollection, qReplication string, ttlSeconds int32, dataCenter, rack string) *operation.StorageOption { collection := util.Nvl(qCollection, fs.option.Collection) replication := util.Nvl(qReplication, fs.option.DefaultReplication) @@ -131,7 +131,7 @@ func (fs *FilerServer) detectStorageOption(requestURI, qCollection, qReplication if err != nil { glog.Errorf("fail to parse %s ttl setting %s: %v", rule.LocationPrefix, rule.Ttl, err) } - ttlSeconds = int32(ttl.Minutes())*60 + ttlSeconds = int32(ttl.Minutes()) * 60 } return &operation.StorageOption{ @@ -144,7 +144,7 @@ func (fs *FilerServer) detectStorageOption(requestURI, qCollection, qReplication } } -func (fs *FilerServer) detectStorageOption0(requestURI, qCollection, qReplication string, qTtl string, dataCenter, rack string) (*operation.StorageOption) { +func (fs *FilerServer) detectStorageOption0(requestURI, qCollection, qReplication string, qTtl string, dataCenter, rack string) *operation.StorageOption { ttl, err := needle.ReadTTL(qTtl) if err != nil { |
