mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
go fmt
This commit is contained in:
parent
ea26a98753
commit
446e476a11
|
@ -84,4 +84,3 @@ func ReadFilerSignature(grpcDialOption grpc.DialOption, filer string) (filerSign
|
||||||
}
|
}
|
||||||
return filerSignature, nil
|
return filerSignature, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,6 @@ func TestIsGoodMove(t *testing.T) {
|
||||||
|
|
||||||
var tests = []testMoveCase{
|
var tests = []testMoveCase{
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
name: "test 100 move to spread into proper data centers",
|
name: "test 100 move to spread into proper data centers",
|
||||||
replication: "100",
|
replication: "100",
|
||||||
|
@ -132,7 +131,6 @@ func TestIsGoodMove(t *testing.T) {
|
||||||
targetLocation: location{"dc1", "r2", &master_pb.DataNodeInfo{Id: "dn3"}},
|
targetLocation: location{"dc1", "r2", &master_pb.DataNodeInfo{Id: "dn3"}},
|
||||||
expected: true,
|
expected: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, tt := range tests {
|
for _, tt := range tests {
|
||||||
|
|
|
@ -16,7 +16,7 @@ var(
|
||||||
UnsupportedCompression = fmt.Errorf("unsupported compression")
|
UnsupportedCompression = fmt.Errorf("unsupported compression")
|
||||||
)
|
)
|
||||||
|
|
||||||
func MaybeGzipData(input []byte) ([]byte) {
|
func MaybeGzipData(input []byte) []byte {
|
||||||
if IsGzippedContent(input) {
|
if IsGzippedContent(input) {
|
||||||
return input
|
return input
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ func MaybeGzipData(input []byte) ([]byte) {
|
||||||
return gzipped
|
return gzipped
|
||||||
}
|
}
|
||||||
|
|
||||||
func MaybeDecompressData(input []byte) ([]byte) {
|
func MaybeDecompressData(input []byte) []byte {
|
||||||
uncompressed, err := DecompressData(input)
|
uncompressed, err := DecompressData(input)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if err != UnsupportedCompression {
|
if err != UnsupportedCompression {
|
||||||
|
|
Loading…
Reference in a new issue