Browse Source

go fmt

pull/1475/head
Chris Lu 4 years ago
parent
commit
446e476a11
  1. 1
      weed/replication/replicator.go
  2. 2
      weed/shell/command_volume_balance_test.go
  3. 4
      weed/util/compression.go

1
weed/replication/replicator.go

@ -84,4 +84,3 @@ func ReadFilerSignature(grpcDialOption grpc.DialOption, filer string) (filerSign
}
return filerSignature, nil
}

2
weed/shell/command_volume_balance_test.go

@ -20,7 +20,6 @@ func TestIsGoodMove(t *testing.T) {
var tests = []testMoveCase{
{
name: "test 100 move to spread into proper data centers",
replication: "100",
@ -132,7 +131,6 @@ func TestIsGoodMove(t *testing.T) {
targetLocation: location{"dc1", "r2", &master_pb.DataNodeInfo{Id: "dn3"}},
expected: true,
},
}
for _, tt := range tests {

4
weed/util/compression.go

@ -16,7 +16,7 @@ var(
UnsupportedCompression = fmt.Errorf("unsupported compression")
)
func MaybeGzipData(input []byte) ([]byte) {
func MaybeGzipData(input []byte) []byte {
if IsGzippedContent(input) {
return input
}
@ -30,7 +30,7 @@ func MaybeGzipData(input []byte) ([]byte) {
return gzipped
}
func MaybeDecompressData(input []byte) ([]byte) {
func MaybeDecompressData(input []byte) []byte {
uncompressed, err := DecompressData(input)
if err != nil {
if err != UnsupportedCompression {

Loading…
Cancel
Save