mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-10-21 13:57:24 +08:00
go fmt
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
package needle
|
||||
|
||||
import (
|
||||
"github.com/google/btree"
|
||||
. "github.com/chrislusf/seaweedfs/weed/storage/types"
|
||||
"github.com/google/btree"
|
||||
)
|
||||
|
||||
//This map assumes mostly inserting increasing keys
|
||||
|
@@ -1,8 +1,8 @@
|
||||
package needle
|
||||
|
||||
import (
|
||||
"sync"
|
||||
. "github.com/chrislusf/seaweedfs/weed/storage/types"
|
||||
"sync"
|
||||
)
|
||||
|
||||
type CompactSection struct {
|
||||
|
@@ -6,8 +6,8 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/chrislusf/seaweedfs/weed/glog"
|
||||
"github.com/chrislusf/seaweedfs/weed/util"
|
||||
. "github.com/chrislusf/seaweedfs/weed/storage/types"
|
||||
"github.com/chrislusf/seaweedfs/weed/util"
|
||||
)
|
||||
|
||||
func TestMemoryUsage(t *testing.T) {
|
||||
@@ -30,9 +30,9 @@ func loadNewNeedleMap(file *os.File) {
|
||||
}
|
||||
for count > 0 && e == nil {
|
||||
for i := 0; i < count; i += 16 {
|
||||
key := BytesToNeedleId(bytes[i:i+NeedleIdSize])
|
||||
offset := BytesToOffset(bytes[i+NeedleIdSize:i+NeedleIdSize+OffsetSize])
|
||||
size := util.BytesToUint32(bytes[i+NeedleIdSize+OffsetSize:i+NeedleIdSize+OffsetSize+SizeSize])
|
||||
key := BytesToNeedleId(bytes[i : i+NeedleIdSize])
|
||||
offset := BytesToOffset(bytes[i+NeedleIdSize : i+NeedleIdSize+OffsetSize])
|
||||
size := util.BytesToUint32(bytes[i+NeedleIdSize+OffsetSize : i+NeedleIdSize+OffsetSize+SizeSize])
|
||||
|
||||
if offset > 0 {
|
||||
m.Set(NeedleId(key), offset, size)
|
||||
|
@@ -1,8 +1,8 @@
|
||||
package needle
|
||||
|
||||
import (
|
||||
"testing"
|
||||
. "github.com/chrislusf/seaweedfs/weed/storage/types"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestIssue52(t *testing.T) {
|
||||
|
@@ -1,8 +1,8 @@
|
||||
package needle
|
||||
|
||||
import (
|
||||
"github.com/google/btree"
|
||||
. "github.com/chrislusf/seaweedfs/weed/storage/types"
|
||||
"github.com/google/btree"
|
||||
)
|
||||
|
||||
const (
|
||||
|
Reference in New Issue
Block a user