Browse Source

go fmt

pull/697/head
Chris Lu 7 years ago
parent
commit
0655151b8c
  1. 2
      weed/command/mount.go
  2. 2
      weed/command/mount_std.go
  3. 2
      weed/filesys/wfs.go
  4. 2
      weed/s3api/s3api_errors.go
  5. 2
      weed/s3api/s3api_object_handlers.go
  6. 12
      weed/s3api/s3api_objects_list_handlers.go
  7. 2
      weed/s3api/s3api_server.go

2
weed/command/mount.go

@ -1,9 +1,9 @@
package command
import (
"strings"
"fmt"
"strconv"
"strings"
)
type MountOptions struct {

2
weed/command/mount_std.go

@ -60,7 +60,7 @@ func runMount(cmd *Command, args []string) bool {
mountRoot := *mountOptions.filerMountRootPath
if mountRoot != "/" && strings.HasSuffix(mountRoot, "/") {
mountRoot = mountRoot[0: len(mountRoot)-1]
mountRoot = mountRoot[0 : len(mountRoot)-1]
}
err = fs.Serve(c, filesys.NewSeaweedFileSystem(&filesys.Option{

2
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),
}

2
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.html
const (
ErrNone ErrorCode = iota
ErrNone ErrorCode = iota
ErrMethodNotAllowed
ErrBucketNotEmpty
ErrBucketAlreadyExists

2
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 (

12
weed/s3api/s3api_objects_list_handlers.go

@ -1,17 +1,17 @@
package s3api
import (
"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 (

2
weed/s3api/s3api_server.go

@ -37,7 +37,7 @@ func (s3a *S3ApiServer) registerRouter(router *mux.Router) {
apiRouter := router.PathPrefix("/").Subrouter()
var routers []*mux.Router
if 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())

Loading…
Cancel
Save