Browse Source

go fmt

pull/1390/head
Chris Lu 5 years ago
parent
commit
ddec7b2bb9
  1. 2
      weed/filer2/meta_aggregator.go
  2. 2
      weed/filesys/meta_cache/meta_cache.go
  3. 2
      weed/filesys/unimplemented.go
  4. 1
      weed/operation/needle_parse_test.go
  5. 2
      weed/storage/erasure_coding/ec_decoder.go
  6. 5
      weed/util/bounded_tree/bounded_tree_test.go
  7. 1
      weed/util/compression.go

2
weed/filer2/meta_aggregator.go

@ -98,7 +98,7 @@ func (ma *MetaAggregator) subscribeToOneFiler(f *Filer, self string, filer strin
for { for {
err := pb.WithFilerClient(filer, ma.grpcDialOption, func(client filer_pb.SeaweedFilerClient) error { err := pb.WithFilerClient(filer, ma.grpcDialOption, func(client filer_pb.SeaweedFilerClient) error {
stream, err := client.SubscribeLocalMetadata(context.Background(), &filer_pb.SubscribeMetadataRequest{ stream, err := client.SubscribeLocalMetadata(context.Background(), &filer_pb.SubscribeMetadataRequest{
ClientName: "filer:"+self,
ClientName: "filer:" + self,
PathPrefix: "/", PathPrefix: "/",
SinceNs: lastTsNs, SinceNs: lastTsNs,
}) })

2
weed/filesys/meta_cache/meta_cache.go

@ -60,7 +60,7 @@ func (mc *MetaCache) AtomicUpdateEntry(ctx context.Context, oldPath util.FullPat
return err return err
} }
} }
}else{
} else {
// println("unknown old directory:", oldDir) // println("unknown old directory:", oldDir)
} }

2
weed/filesys/unimplemented.go

@ -10,11 +10,13 @@ import (
// https://github.com/bazil/fuse/issues/130 // https://github.com/bazil/fuse/issues/130
var _ = fs.NodeAccesser(&Dir{}) var _ = fs.NodeAccesser(&Dir{})
func (dir *Dir) Access(ctx context.Context, req *fuse.AccessRequest) error { func (dir *Dir) Access(ctx context.Context, req *fuse.AccessRequest) error {
return fuse.ENOSYS return fuse.ENOSYS
} }
var _ = fs.NodeAccesser(&File{}) var _ = fs.NodeAccesser(&File{})
func (file *File) Access(ctx context.Context, req *fuse.AccessRequest) error { func (file *File) Access(ctx context.Context, req *fuse.AccessRequest) error {
return fuse.ENOSYS return fuse.ENOSYS
} }

1
weed/operation/needle_parse_test.go

@ -101,7 +101,6 @@ func TestCreateNeedleFromRequest(t *testing.T) {
} }
var textContent = `Redistribution and use in source and binary forms, with or without var textContent = `Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are modification, are permitted provided that the following conditions are
met: met:

2
weed/storage/erasure_coding/ec_decoder.go

@ -119,7 +119,7 @@ func iterateEcxFile(baseFileName string, processNeedleFn func(key types.NeedleId
} }
func iterateEcjFile(baseFileName string, processNeedleFn func(key types.NeedleId) error) error { func iterateEcjFile(baseFileName string, processNeedleFn func(key types.NeedleId) error) error {
if !util.FileExists(baseFileName+".ecj") {
if !util.FileExists(baseFileName + ".ecj") {
return nil return nil
} }
ecjFile, openErr := os.OpenFile(baseFileName+".ecj", os.O_RDONLY, 0644) ecjFile, openErr := os.OpenFile(baseFileName+".ecj", os.O_RDONLY, 0644)

5
weed/util/bounded_tree/bounded_tree_test.go

@ -9,9 +9,7 @@ import (
"github.com/chrislusf/seaweedfs/weed/util" "github.com/chrislusf/seaweedfs/weed/util"
) )
var ( var (
visitFn = func(path util.FullPath) (childDirectories []string, err error) { visitFn = func(path util.FullPath) (childDirectories []string, err error) {
fmt.Printf(" visit %v ...\n", path) fmt.Printf(" visit %v ...\n", path)
switch path { switch path {
@ -37,14 +35,11 @@ var (
return nil, nil return nil, nil
} }
printMap = func(m map[string]*Node) { printMap = func(m map[string]*Node) {
for k := range m { for k := range m {
println(" >", k) println(" >", k)
} }
} }
) )
func TestBoundedTree(t *testing.T) { func TestBoundedTree(t *testing.T) {

1
weed/util/compression.go

@ -54,6 +54,7 @@ func ungzipData(input []byte) ([]byte, error) {
} }
var decoder, _ = zstd.NewReader(nil) var decoder, _ = zstd.NewReader(nil)
func unzstdData(input []byte) ([]byte, error) { func unzstdData(input []byte) ([]byte, error) {
return decoder.DecodeAll(input, nil) return decoder.DecodeAll(input, nil)
} }

Loading…
Cancel
Save