SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
go fmt
Chris Lu0655151b8c55
diff --git a/weed/command/mount.go b/weed/command/mount.goindex 0912a51ba2..6130669516 100644--- a/weed/command/mount.go+++ b/weed/command/mount.go@@ -1,9 +1,9 @@package commandimport (- "strings""fmt""strconv"+ "strings")type MountOptions struct {diff --git a/weed/command/mount_std.go b/weed/command/mount_std.goindex 8f4d8dc36e..92dcc90081 100644--- a/weed/command/mount_std.go+++ b/weed/command/mount_std.go@@ -60,7 +60,7 @@ func runMount(cmd *Command, args []string) bool {mountRoot := *mountOptions.filerMountRootPathif mountRoot != "/" && strings.HasSuffix(mountRoot, "/") {- mountRoot = mountRoot[0: len(mountRoot)-1]+ mountRoot = mountRoot[0 : len(mountRoot)-1]}err = fs.Serve(c, filesys.NewSeaweedFileSystem(&filesys.Option{diff --git a/weed/filesys/wfs.go b/weed/filesys/wfs.goindex 423ec54e42..9b1b98ebf8 100644--- a/weed/filesys/wfs.go+++ b/weed/filesys/wfs.go@@ -34,7 +34,7 @@ type WFS struct {func NewSeaweedFileSystem(option *Option) *WFS {return &WFS{- option: option,+ option: option,listDirectoryEntriesCache: ccache.New(ccache.Configure().MaxSize(6000).ItemsToPrune(100)),pathToHandleIndex: make(map[string]int),}diff --git a/weed/s3api/s3api_errors.go b/weed/s3api/s3api_errors.goindex 2a86595fb8..e5ce8df5a7 100644--- a/weed/s3api/s3api_errors.go+++ b/weed/s3api/s3api_errors.go@@ -26,7 +26,7 @@ type ErrorCode int// Error codes, see full list at http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.htmlconst (- ErrNone ErrorCode = iota+ ErrNone ErrorCode = iotaErrMethodNotAllowedErrBucketNotEmptyErrBucketAlreadyExistsdiff --git a/weed/s3api/s3api_object_handlers.go b/weed/s3api/s3api_object_handlers.goindex 6c1895cbcd..a9be99d2f0 100644--- a/weed/s3api/s3api_object_handlers.go+++ b/weed/s3api/s3api_object_handlers.go@@ -5,9 +5,9 @@ import ("fmt""github.com/chrislusf/seaweedfs/weed/glog""github.com/gorilla/mux"+ "io""io/ioutil""net/http"- "io")var (diff --git a/weed/s3api/s3api_objects_list_handlers.go b/weed/s3api/s3api_objects_list_handlers.goindex 6699ccd0c0..46a623202f 100644--- a/weed/s3api/s3api_objects_list_handlers.go+++ b/weed/s3api/s3api_objects_list_handlers.go@@ -1,17 +1,17 @@package s3apiimport (+ "context"+ "fmt"+ "github.com/chrislusf/seaweedfs/weed/filer2"+ "github.com/chrislusf/seaweedfs/weed/glog"+ "github.com/chrislusf/seaweedfs/weed/pb/filer_pb""github.com/gorilla/mux""net/http""net/url"- "strconv"- "github.com/chrislusf/seaweedfs/weed/glog"- "github.com/chrislusf/seaweedfs/weed/pb/filer_pb"- "context"- "fmt""path/filepath"+ "strconv""time"- "github.com/chrislusf/seaweedfs/weed/filer2")const (diff --git a/weed/s3api/s3api_server.go b/weed/s3api/s3api_server.goindex 463f6e1569..f5748da097 100644--- a/weed/s3api/s3api_server.go+++ b/weed/s3api/s3api_server.go@@ -37,7 +37,7 @@ func (s3a *S3ApiServer) registerRouter(router *mux.Router) {apiRouter := router.PathPrefix("/").Subrouter()var routers []*mux.Routerif s3a.option.DomainName != "" {- routers = append(routers, apiRouter.Host("{bucket:.+}." + s3a.option.DomainName).Subrouter())+ routers = append(routers, apiRouter.Host("{bucket:.+}."+s3a.option.DomainName).Subrouter())}routers = append(routers, apiRouter.PathPrefix("/{bucket}").Subrouter())