Browse Source

go fmt

pull/778/head
Chris Lu 6 years ago
parent
commit
86dd933596
  1. 2
      weed/filer2/filechunks.go
  2. 3
      weed/filer2/filechunks_test.go
  3. 2
      weed/filer2/filer_deletion.go
  4. 1
      weed/filesys/filehandle.go
  5. 3
      weed/operation/assign_file_id.go
  6. 2
      weed/operation/grpc_client.go
  7. 2
      weed/server/filer_grpc_server.go
  8. 2
      weed/server/master_grpc_server_volume.go
  9. 4
      weed/storage/crc.go

2
weed/filer2/filechunks.go

@ -109,7 +109,7 @@ var bufPool = sync.Pool{
},
}
func mergeIntoVisibles(visibles, newVisibles []*visibleInterval, chunk *filer_pb.FileChunk, ) ([]*visibleInterval) {
func mergeIntoVisibles(visibles, newVisibles []*visibleInterval, chunk *filer_pb.FileChunk) []*visibleInterval {
newV := newVisibleInterval(
chunk.Offset,

3
weed/filer2/filechunks_test.go

@ -4,8 +4,8 @@ import (
"log"
"testing"
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
"fmt"
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
)
func TestCompactFileChunks(t *testing.T) {
@ -27,7 +27,6 @@ func TestCompactFileChunks(t *testing.T) {
}
func TestCompactFileChunks2(t *testing.T) {
chunks := []*filer_pb.FileChunk{

2
weed/filer2/filer_deletion.go

@ -3,9 +3,9 @@ package filer2
import (
"time"
"github.com/chrislusf/seaweedfs/weed/glog"
"github.com/chrislusf/seaweedfs/weed/operation"
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
"github.com/chrislusf/seaweedfs/weed/glog"
)
func (f *Filer) loopProcessingDeletion() {

1
weed/filesys/filehandle.go

@ -46,6 +46,7 @@ func (fh *FileHandle) InitializeToFile(file *File, uid, gid uint32) *FileHandle
}
return newHandle
}
var _ = fs.Handle(&FileHandle{})
// var _ = fs.HandleReadAller(&FileHandle{})

3
weed/operation/assign_file_id.go

@ -1,9 +1,10 @@
package operation
import (
"context"
"fmt"
"github.com/chrislusf/seaweedfs/weed/pb/master_pb"
"context"
)
type VolumeAssignRequest struct {

2
weed/operation/grpc_client.go

@ -4,12 +4,12 @@ import (
"fmt"
"strconv"
"strings"
"sync"
"github.com/chrislusf/seaweedfs/weed/glog"
"github.com/chrislusf/seaweedfs/weed/pb/master_pb"
"github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb"
"github.com/chrislusf/seaweedfs/weed/util"
"sync"
"google.golang.org/grpc"
)

2
weed/server/filer_grpc_server.go

@ -13,8 +13,8 @@ import (
"github.com/chrislusf/seaweedfs/weed/glog"
"github.com/chrislusf/seaweedfs/weed/operation"
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
"github.com/chrislusf/seaweedfs/weed/util"
"github.com/chrislusf/seaweedfs/weed/pb/master_pb"
"github.com/chrislusf/seaweedfs/weed/util"
)
func (fs *FilerServer) LookupDirectoryEntry(ctx context.Context, req *filer_pb.LookupDirectoryEntryRequest) (*filer_pb.LookupDirectoryEntryResponse, error) {

2
weed/server/master_grpc_server_volume.go

@ -5,8 +5,8 @@ import (
"fmt"
"github.com/chrislusf/seaweedfs/weed/pb/master_pb"
"github.com/chrislusf/seaweedfs/weed/topology"
"github.com/chrislusf/seaweedfs/weed/storage"
"github.com/chrislusf/seaweedfs/weed/topology"
)
func (ms *MasterServer) LookupVolume(ctx context.Context, req *master_pb.LookupVolumeRequest) (*master_pb.LookupVolumeResponse, error) {

4
weed/storage/crc.go

@ -1,11 +1,11 @@
package storage
import (
"fmt"
"crypto/md5"
"fmt"
"github.com/klauspost/crc32"
"github.com/chrislusf/seaweedfs/weed/util"
"github.com/klauspost/crc32"
)
var table = crc32.MakeTable(crc32.Castagnoli)

Loading…
Cancel
Save