formatting code by: goimports -w=true .

This commit is contained in:
Chris Lu
2014-10-26 11:34:55 -07:00
parent a5d6e70299
commit 179d36ba0e
84 changed files with 205 additions and 170 deletions

View File

@@ -1,13 +1,14 @@
package storage
import (
"github.com/chrislusf/weed-fs/go/util"
"encoding/json"
"errors"
"fmt"
"github.com/tgulacsi/go-cdb"
"os"
"path/filepath"
"github.com/chrislusf/weed-fs/go/util"
"github.com/tgulacsi/go-cdb"
)
// CDB-backed read-only needle map

View File

@@ -1,11 +1,12 @@
package storage
import (
"github.com/chrislusf/weed-fs/go/glog"
"math/rand"
"os"
"runtime"
"testing"
"github.com/chrislusf/weed-fs/go/glog"
)
var testIndexFilename string = "../../test/sample.idx"

View File

@@ -1,7 +1,5 @@
package storage
import ()
type NeedleValue struct {
Key Key
Offset uint32 `comment:"Volume offset"` //since aligned to 8 bytes, range is 4G*8=32G

View File

@@ -1,11 +1,12 @@
package storage
import (
"github.com/chrislusf/weed-fs/go/glog"
"github.com/chrislusf/weed-fs/go/util"
"log"
"os"
"testing"
"github.com/chrislusf/weed-fs/go/glog"
"github.com/chrislusf/weed-fs/go/util"
)
func TestMemoryUsage(t *testing.T) {

View File

@@ -2,11 +2,12 @@ package storage
import (
"bytes"
"github.com/chrislusf/weed-fs/go/glog"
"compress/flate"
"compress/gzip"
"io/ioutil"
"strings"
"github.com/chrislusf/weed-fs/go/glog"
)
/*

View File

@@ -1,9 +1,10 @@
package storage
import (
"github.com/chrislusf/weed-fs/go/util"
"fmt"
"hash/crc32"
"github.com/chrislusf/weed-fs/go/util"
)
var table = crc32.MakeTable(crc32.Castagnoli)

View File

@@ -1,11 +1,12 @@
package storage
import (
"github.com/chrislusf/weed-fs/go/glog"
"github.com/chrislusf/weed-fs/go/util"
"encoding/hex"
"errors"
"strings"
"github.com/chrislusf/weed-fs/go/glog"
"github.com/chrislusf/weed-fs/go/util"
)
type FileId struct {

View File

@@ -1,9 +1,6 @@
package storage
import (
"github.com/chrislusf/weed-fs/go/glog"
"github.com/chrislusf/weed-fs/go/images"
"github.com/chrislusf/weed-fs/go/util"
"encoding/hex"
"errors"
"io/ioutil"
@@ -13,6 +10,10 @@ import (
"strconv"
"strings"
"time"
"github.com/chrislusf/weed-fs/go/glog"
"github.com/chrislusf/weed-fs/go/images"
"github.com/chrislusf/weed-fs/go/util"
)
const (

View File

@@ -1,11 +1,12 @@
package storage
import (
"github.com/chrislusf/weed-fs/go/glog"
"github.com/chrislusf/weed-fs/go/util"
"fmt"
"io"
"os"
"github.com/chrislusf/weed-fs/go/glog"
"github.com/chrislusf/weed-fs/go/util"
)
type NeedleMapper interface {

View File

@@ -1,12 +1,13 @@
package storage
import (
"github.com/chrislusf/weed-fs/go/glog"
"github.com/chrislusf/weed-fs/go/util"
"errors"
"fmt"
"io"
"os"
"github.com/chrislusf/weed-fs/go/glog"
"github.com/chrislusf/weed-fs/go/util"
)
const (

View File

@@ -1,10 +1,6 @@
package storage
import (
proto "code.google.com/p/goprotobuf/proto"
"github.com/chrislusf/weed-fs/go/glog"
"github.com/chrislusf/weed-fs/go/operation"
"github.com/chrislusf/weed-fs/go/util"
"encoding/json"
"errors"
"fmt"
@@ -12,6 +8,11 @@ import (
"math/rand"
"strconv"
"strings"
proto "code.google.com/p/goprotobuf/proto"
"github.com/chrislusf/weed-fs/go/glog"
"github.com/chrislusf/weed-fs/go/operation"
"github.com/chrislusf/weed-fs/go/util"
)
const (

View File

@@ -1,9 +1,10 @@
package storage
import (
"github.com/chrislusf/weed-fs/go/glog"
"fmt"
"strconv"
"github.com/chrislusf/weed-fs/go/glog"
)
func (s *Store) CheckCompactVolume(volumeIdString string, garbageThresholdString string) (error, bool) {

View File

@@ -4,12 +4,13 @@ import (
"bytes"
"errors"
"fmt"
"github.com/chrislusf/weed-fs/go/glog"
"io"
"os"
"path"
"sync"
"time"
"github.com/chrislusf/weed-fs/go/glog"
)
type Volume struct {

View File

@@ -1,9 +1,10 @@
package storage
import (
"github.com/chrislusf/weed-fs/go/glog"
"fmt"
"os"
"github.com/chrislusf/weed-fs/go/glog"
)
const (

View File

@@ -1,10 +1,11 @@
package storage
import (
"github.com/chrislusf/weed-fs/go/glog"
"fmt"
"os"
"time"
"github.com/chrislusf/weed-fs/go/glog"
)
func (v *Volume) garbageLevel() float64 {

View File

@@ -1,7 +1,5 @@
package storage
import ()
type Version uint8
const (