aboutsummaryrefslogtreecommitdiff
path: root/go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2014-10-26 11:34:55 -0700
committerChris Lu <chris.lu@gmail.com>2014-10-26 11:34:55 -0700
commit179d36ba0e35e4bdad86988a49828836b649e3df (patch)
tree90c15051728350d3470fbaa44f8531532bdcf386 /go
parenta5d6e70299559c10126f6ef248f475152303a79a (diff)
downloadseaweedfs-179d36ba0e35e4bdad86988a49828836b649e3df.tar.xz
seaweedfs-179d36ba0e35e4bdad86988a49828836b649e3df.zip
formatting code by: goimports -w=true .
Diffstat (limited to 'go')
-rw-r--r--go/filer/client_operations.go6
-rw-r--r--go/filer/directory.go2
-rw-r--r--go/filer/directory_in_map.go3
-rw-r--r--go/filer/filer.go2
-rw-r--r--go/filer/filer_embedded.go3
-rw-r--r--go/filer/files_in_leveldb.go1
-rw-r--r--go/glog/convenient_api.go2
-rw-r--r--go/images/orientation.go3
-rw-r--r--go/images/resizing.go3
-rw-r--r--go/operation/assign_file_id.go5
-rw-r--r--go/operation/data_struts.go2
-rw-r--r--go/operation/delete_content.go3
-rw-r--r--go/operation/list_masters.go3
-rw-r--r--go/operation/lookup.go3
-rw-r--r--go/operation/submit.go3
-rw-r--r--go/operation/system_message_test.go3
-rw-r--r--go/operation/upload_content.go3
-rw-r--r--go/sequence/sequence.go2
-rw-r--r--go/stats/disk.go2
-rw-r--r--go/stats/disk_notsupported.go2
-rw-r--r--go/stats/memory_notsupported.go2
-rw-r--r--go/storage/cdb_map.go5
-rw-r--r--go/storage/cdb_map_test.go3
-rw-r--r--go/storage/compact_map.go2
-rw-r--r--go/storage/compact_map_perf_test.go5
-rw-r--r--go/storage/compress.go3
-rw-r--r--go/storage/crc.go3
-rw-r--r--go/storage/file_id.go5
-rw-r--r--go/storage/needle.go7
-rw-r--r--go/storage/needle_map.go5
-rw-r--r--go/storage/needle_read_write.go5
-rw-r--r--go/storage/store.go9
-rw-r--r--go/storage/store_vacuum.go3
-rw-r--r--go/storage/volume.go3
-rw-r--r--go/storage/volume_super_block.go3
-rw-r--r--go/storage/volume_vacuum.go3
-rw-r--r--go/storage/volume_version.go2
-rw-r--r--go/tools/read_index.go3
-rw-r--r--go/topology/allocate_volume.go5
-rw-r--r--go/topology/data_center.go2
-rw-r--r--go/topology/data_node.go3
-rw-r--r--go/topology/node.go5
-rw-r--r--go/topology/store_replicate.go5
-rw-r--r--go/topology/topology.go7
-rw-r--r--go/topology/topology_event_handling.go5
-rw-r--r--go/topology/topology_map.go2
-rw-r--r--go/topology/topology_vacuum.go7
-rw-r--r--go/topology/volume_growth.go5
-rw-r--r--go/topology/volume_growth_test.go5
-rw-r--r--go/topology/volume_layout.go5
-rw-r--r--go/topology/volume_location_list.go2
-rw-r--r--go/util/config.go3
-rw-r--r--go/util/constants.go2
-rw-r--r--go/util/file_util.go3
-rw-r--r--go/util/net_timeout.go3
-rw-r--r--go/weed/benchmark.go7
-rw-r--r--go/weed/download.go5
-rw-r--r--go/weed/export.go5
-rw-r--r--go/weed/filer.go7
-rw-r--r--go/weed/fix.go5
-rw-r--r--go/weed/master.go9
-rw-r--r--go/weed/mount.go2
-rw-r--r--go/weed/mount_std.go7
-rw-r--r--go/weed/server.go9
-rw-r--r--go/weed/shell.go3
-rw-r--r--go/weed/signal_handling_notsupported.go2
-rw-r--r--go/weed/upload.go3
-rw-r--r--go/weed/version.go3
-rw-r--r--go/weed/volume.go7
-rw-r--r--go/weed/volume_test.go3
-rw-r--r--go/weed/weed.go3
-rw-r--r--go/weed/weed_server/common.go11
-rw-r--r--go/weed/weed_server/filer_server.go5
-rw-r--r--go/weed/weed_server/filer_server_handlers.go9
-rw-r--r--go/weed/weed_server/filer_server_handlers_admin.go3
-rw-r--r--go/weed/weed_server/master_server.go9
-rw-r--r--go/weed/weed_server/master_server_handlers.go7
-rw-r--r--go/weed/weed_server/master_server_handlers_admin.go13
-rw-r--r--go/weed/weed_server/raft_server.go9
-rw-r--r--go/weed/weed_server/raft_server_handlers.go7
-rw-r--r--go/weed/weed_server/volume_server.go5
-rw-r--r--go/weed/weed_server/volume_server_handlers.go13
-rw-r--r--go/weed/weed_server/volume_server_handlers_admin.go5
-rw-r--r--go/weed/weed_server/volume_server_handlers_vacuum.go3
84 files changed, 205 insertions, 170 deletions
diff --git a/go/filer/client_operations.go b/go/filer/client_operations.go
index 0b006289f..b38368735 100644
--- a/go/filer/client_operations.go
+++ b/go/filer/client_operations.go
@@ -1,12 +1,12 @@
package filer
-import ()
-
import (
- "github.com/chrislusf/weed-fs/go/util"
"encoding/json"
"errors"
"fmt"
+
+ "github.com/chrislusf/weed-fs/go/util"
+
"net/url"
)
diff --git a/go/filer/directory.go b/go/filer/directory.go
index 956a2f504..66d1aeba5 100644
--- a/go/filer/directory.go
+++ b/go/filer/directory.go
@@ -1,7 +1,5 @@
package filer
-import ()
-
type DirectoryId int32
type DirectoryEntry struct {
diff --git a/go/filer/directory_in_map.go b/go/filer/directory_in_map.go
index 1d88a78be..ee601066c 100644
--- a/go/filer/directory_in_map.go
+++ b/go/filer/directory_in_map.go
@@ -2,7 +2,6 @@ package filer
import (
"bufio"
- "github.com/chrislusf/weed-fs/go/util"
"fmt"
"io"
"os"
@@ -10,6 +9,8 @@ import (
"strconv"
"strings"
"sync"
+
+ "github.com/chrislusf/weed-fs/go/util"
)
var writeLock sync.Mutex //serialize changes to dir.log
diff --git a/go/filer/filer.go b/go/filer/filer.go
index de877fc1f..bf4a1cb19 100644
--- a/go/filer/filer.go
+++ b/go/filer/filer.go
@@ -1,7 +1,5 @@
package filer
-import ()
-
type FileId string //file id on weedfs
type FileEntry struct {
diff --git a/go/filer/filer_embedded.go b/go/filer/filer_embedded.go
index 3d3dac941..0b9b4e668 100644
--- a/go/filer/filer_embedded.go
+++ b/go/filer/filer_embedded.go
@@ -1,11 +1,12 @@
package filer
import (
- "github.com/chrislusf/weed-fs/go/operation"
"errors"
"fmt"
"path/filepath"
"strings"
+
+ "github.com/chrislusf/weed-fs/go/operation"
)
type FilerEmbedded struct {
diff --git a/go/filer/files_in_leveldb.go b/go/filer/files_in_leveldb.go
index 41fbc74bd..781bb0e5f 100644
--- a/go/filer/files_in_leveldb.go
+++ b/go/filer/files_in_leveldb.go
@@ -2,6 +2,7 @@ package filer
import (
"bytes"
+
"github.com/chrislusf/weed-fs/go/glog"
"github.com/syndtr/goleveldb/leveldb"
"github.com/syndtr/goleveldb/leveldb/util"
diff --git a/go/glog/convenient_api.go b/go/glog/convenient_api.go
index 3c378083f..cb43d60e2 100644
--- a/go/glog/convenient_api.go
+++ b/go/glog/convenient_api.go
@@ -1,7 +1,5 @@
package glog
-import ()
-
/*
Copying the original glog because it is missing several convenient methods.
1. remove nano time in log format
diff --git a/go/images/orientation.go b/go/images/orientation.go
index 41ed3f0af..4bff89311 100644
--- a/go/images/orientation.go
+++ b/go/images/orientation.go
@@ -2,11 +2,12 @@ package images
import (
"bytes"
- "github.com/rwcarlsen/goexif/exif"
"image"
"image/draw"
"image/jpeg"
"log"
+
+ "github.com/rwcarlsen/goexif/exif"
)
//many code is copied from http://camlistore.org/pkg/images/images.go
diff --git a/go/images/resizing.go b/go/images/resizing.go
index 08a1e15d2..e9de5f7d7 100644
--- a/go/images/resizing.go
+++ b/go/images/resizing.go
@@ -2,11 +2,12 @@ package images
import (
"bytes"
- "github.com/disintegration/imaging"
"image"
"image/gif"
"image/jpeg"
"image/png"
+
+ "github.com/disintegration/imaging"
)
func Resized(ext string, data []byte, width, height int) (resized []byte, w int, h int) {
diff --git a/go/operation/assign_file_id.go b/go/operation/assign_file_id.go
index 4e72ad939..672bfa99c 100644
--- a/go/operation/assign_file_id.go
+++ b/go/operation/assign_file_id.go
@@ -1,12 +1,13 @@
package operation
import (
- "github.com/chrislusf/weed-fs/go/glog"
- "github.com/chrislusf/weed-fs/go/util"
"encoding/json"
"errors"
"net/url"
"strconv"
+
+ "github.com/chrislusf/weed-fs/go/glog"
+ "github.com/chrislusf/weed-fs/go/util"
)
type AssignResult struct {
diff --git a/go/operation/data_struts.go b/go/operation/data_struts.go
index 09fab05d1..4980f9913 100644
--- a/go/operation/data_struts.go
+++ b/go/operation/data_struts.go
@@ -1,7 +1,5 @@
package operation
-import ()
-
type JoinResult struct {
VolumeSizeLimit uint64 `json:"VolumeSizeLimit,omitempty"`
Error string `json:"error,omitempty"`
diff --git a/go/operation/delete_content.go b/go/operation/delete_content.go
index 84391b634..416a852b3 100644
--- a/go/operation/delete_content.go
+++ b/go/operation/delete_content.go
@@ -1,12 +1,13 @@
package operation
import (
- "github.com/chrislusf/weed-fs/go/util"
"encoding/json"
"errors"
"net/url"
"strings"
"sync"
+
+ "github.com/chrislusf/weed-fs/go/util"
)
type DeleteResult struct {
diff --git a/go/operation/list_masters.go b/go/operation/list_masters.go
index 7d46a9ebc..7ada94243 100644
--- a/go/operation/list_masters.go
+++ b/go/operation/list_masters.go
@@ -1,9 +1,10 @@
package operation
import (
+ "encoding/json"
+
"github.com/chrislusf/weed-fs/go/glog"
"github.com/chrislusf/weed-fs/go/util"
- "encoding/json"
)
type ClusterStatusResult struct {
diff --git a/go/operation/lookup.go b/go/operation/lookup.go
index ebf153d27..e6b6658da 100644
--- a/go/operation/lookup.go
+++ b/go/operation/lookup.go
@@ -1,7 +1,6 @@
package operation
import (
- "github.com/chrislusf/weed-fs/go/util"
"encoding/json"
"errors"
_ "fmt"
@@ -9,6 +8,8 @@ import (
"net/url"
"strings"
"time"
+
+ "github.com/chrislusf/weed-fs/go/util"
)
type Location struct {
diff --git a/go/operation/submit.go b/go/operation/submit.go
index 3e09c2edf..62db46617 100644
--- a/go/operation/submit.go
+++ b/go/operation/submit.go
@@ -2,13 +2,14 @@ package operation
import (
"bytes"
- "github.com/chrislusf/weed-fs/go/glog"
"io"
"mime"
"os"
"path"
"strconv"
"strings"
+
+ "github.com/chrislusf/weed-fs/go/glog"
)
type FilePart struct {
diff --git a/go/operation/system_message_test.go b/go/operation/system_message_test.go
index 2731d0b2f..b5624c258 100644
--- a/go/operation/system_message_test.go
+++ b/go/operation/system_message_test.go
@@ -1,10 +1,11 @@
package operation
import (
- proto "code.google.com/p/goprotobuf/proto"
"encoding/json"
"log"
"testing"
+
+ proto "code.google.com/p/goprotobuf/proto"
)
func TestSerialDeserial(t *testing.T) {
diff --git a/go/operation/upload_content.go b/go/operation/upload_content.go
index 38737702d..480d76dca 100644
--- a/go/operation/upload_content.go
+++ b/go/operation/upload_content.go
@@ -2,7 +2,6 @@ package operation
import (
"bytes"
- "github.com/chrislusf/weed-fs/go/glog"
"encoding/json"
"errors"
"fmt"
@@ -14,6 +13,8 @@ import (
"net/textproto"
"path/filepath"
"strings"
+
+ "github.com/chrislusf/weed-fs/go/glog"
)
type UploadResult struct {
diff --git a/go/sequence/sequence.go b/go/sequence/sequence.go
index 5a1bceaaf..1aa167b6b 100644
--- a/go/sequence/sequence.go
+++ b/go/sequence/sequence.go
@@ -1,7 +1,5 @@
package sequence
-import ()
-
type Sequencer interface {
NextFileId(count int) (uint64, int)
SetMax(uint64)
diff --git a/go/stats/disk.go b/go/stats/disk.go
index d5275e571..46d8c465e 100644
--- a/go/stats/disk.go
+++ b/go/stats/disk.go
@@ -1,7 +1,5 @@
package stats
-import ()
-
type DiskStatus struct {
Dir string
All uint64
diff --git a/go/stats/disk_notsupported.go b/go/stats/disk_notsupported.go
index 37f9bc47d..e380d27ea 100644
--- a/go/stats/disk_notsupported.go
+++ b/go/stats/disk_notsupported.go
@@ -2,8 +2,6 @@
package stats
-import ()
-
func (disk *DiskStatus) fillInStatus() {
return
}
diff --git a/go/stats/memory_notsupported.go b/go/stats/memory_notsupported.go
index 64c3d7c2f..ba8229364 100644
--- a/go/stats/memory_notsupported.go
+++ b/go/stats/memory_notsupported.go
@@ -2,8 +2,6 @@
package stats
-import ()
-
func (mem *MemStatus) fillInStatus() {
return
}
diff --git a/go/storage/cdb_map.go b/go/storage/cdb_map.go
index 1869a563e..fbb59e9c0 100644
--- a/go/storage/cdb_map.go
+++ b/go/storage/cdb_map.go
@@ -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
diff --git a/go/storage/cdb_map_test.go b/go/storage/cdb_map_test.go
index cff7dfa61..ed690f44f 100644
--- a/go/storage/cdb_map_test.go
+++ b/go/storage/cdb_map_test.go
@@ -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"
diff --git a/go/storage/compact_map.go b/go/storage/compact_map.go
index 9cfc3e8f7..6ac18b012 100644
--- a/go/storage/compact_map.go
+++ b/go/storage/compact_map.go
@@ -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
diff --git a/go/storage/compact_map_perf_test.go b/go/storage/compact_map_perf_test.go
index ef43de25b..f74684225 100644
--- a/go/storage/compact_map_perf_test.go
+++ b/go/storage/compact_map_perf_test.go
@@ -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) {
diff --git a/go/storage/compress.go b/go/storage/compress.go
index a353c9d3a..5efc9e1f1 100644
--- a/go/storage/compress.go
+++ b/go/storage/compress.go
@@ -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"
)
/*
diff --git a/go/storage/crc.go b/go/storage/crc.go
index 7aa400959..af25b9e53 100644
--- a/go/storage/crc.go
+++ b/go/storage/crc.go
@@ -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)
diff --git a/go/storage/file_id.go b/go/storage/file_id.go
index ec566826c..f6e36a98c 100644
--- a/go/storage/file_id.go
+++ b/go/storage/file_id.go
@@ -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 {
diff --git a/go/storage/needle.go b/go/storage/needle.go
index daede321b..aa3206920 100644
--- a/go/storage/needle.go
+++ b/go/storage/needle.go
@@ -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 (
diff --git a/go/storage/needle_map.go b/go/storage/needle_map.go
index dca2e6c5d..504ca1552 100644
--- a/go/storage/needle_map.go
+++ b/go/storage/needle_map.go
@@ -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 {
diff --git a/go/storage/needle_read_write.go b/go/storage/needle_read_write.go
index bf452ba37..663b5abbd 100644
--- a/go/storage/needle_read_write.go
+++ b/go/storage/needle_read_write.go
@@ -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 (
diff --git a/go/storage/store.go b/go/storage/store.go
index e7a9dac94..80d8a30b8 100644
--- a/go/storage/store.go
+++ b/go/storage/store.go
@@ -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 (
diff --git a/go/storage/store_vacuum.go b/go/storage/store_vacuum.go
index 3527e4f59..209e3b4b3 100644
--- a/go/storage/store_vacuum.go
+++ b/go/storage/store_vacuum.go
@@ -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) {
diff --git a/go/storage/volume.go b/go/storage/volume.go
index 60ee1a0c4..5b0a83605 100644
--- a/go/storage/volume.go
+++ b/go/storage/volume.go
@@ -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 {
diff --git a/go/storage/volume_super_block.go b/go/storage/volume_super_block.go
index a7e86b1c3..57e0deea9 100644
--- a/go/storage/volume_super_block.go
+++ b/go/storage/volume_super_block.go
@@ -1,9 +1,10 @@
package storage
import (
- "github.com/chrislusf/weed-fs/go/glog"
"fmt"
"os"
+
+ "github.com/chrislusf/weed-fs/go/glog"
)
const (
diff --git a/go/storage/volume_vacuum.go b/go/storage/volume_vacuum.go
index b348434d2..7e026a61d 100644
--- a/go/storage/volume_vacuum.go
+++ b/go/storage/volume_vacuum.go
@@ -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 {
diff --git a/go/storage/volume_version.go b/go/storage/volume_version.go
index 9702ae904..2e9f58aa2 100644
--- a/go/storage/volume_version.go
+++ b/go/storage/volume_version.go
@@ -1,7 +1,5 @@
package storage
-import ()
-
type Version uint8
const (
diff --git a/go/tools/read_index.go b/go/tools/read_index.go
index b99c5b6b8..1104dc348 100644
--- a/go/tools/read_index.go
+++ b/go/tools/read_index.go
@@ -1,11 +1,12 @@
package main
import (
- "github.com/chrislusf/weed-fs/go/storage"
"flag"
"fmt"
"log"
"os"
+
+ "github.com/chrislusf/weed-fs/go/storage"
)
var (
diff --git a/go/topology/allocate_volume.go b/go/topology/allocate_volume.go
index 6562e9ac5..a791b4c1c 100644
--- a/go/topology/allocate_volume.go
+++ b/go/topology/allocate_volume.go
@@ -1,11 +1,12 @@
package topology
import (
- "github.com/chrislusf/weed-fs/go/storage"
- "github.com/chrislusf/weed-fs/go/util"
"encoding/json"
"errors"
"net/url"
+
+ "github.com/chrislusf/weed-fs/go/storage"
+ "github.com/chrislusf/weed-fs/go/util"
)
type AllocateVolumeResult struct {
diff --git a/go/topology/data_center.go b/go/topology/data_center.go
index ebd07803b..bcf2dfd31 100644
--- a/go/topology/data_center.go
+++ b/go/topology/data_center.go
@@ -1,7 +1,5 @@
package topology
-import ()
-
type DataCenter struct {
NodeImpl
}
diff --git a/go/topology/data_node.go b/go/topology/data_node.go
index c3b90470f..109bd037f 100644
--- a/go/topology/data_node.go
+++ b/go/topology/data_node.go
@@ -1,9 +1,10 @@
package topology
import (
+ "strconv"
+
"github.com/chrislusf/weed-fs/go/glog"
"github.com/chrislusf/weed-fs/go/storage"
- "strconv"
)
type DataNode struct {
diff --git a/go/topology/node.go b/go/topology/node.go
index 54118802e..10955fa72 100644
--- a/go/topology/node.go
+++ b/go/topology/node.go
@@ -1,11 +1,12 @@
package topology
import (
- "github.com/chrislusf/weed-fs/go/glog"
- "github.com/chrislusf/weed-fs/go/storage"
"errors"
"math/rand"
"strings"
+
+ "github.com/chrislusf/weed-fs/go/glog"
+ "github.com/chrislusf/weed-fs/go/storage"
)
type NodeId string
diff --git a/go/topology/store_replicate.go b/go/topology/store_replicate.go
index 6ea019bd8..0c52f9d30 100644
--- a/go/topology/store_replicate.go
+++ b/go/topology/store_replicate.go
@@ -2,12 +2,13 @@ package topology
import (
"bytes"
+ "net/http"
+ "strconv"
+
"github.com/chrislusf/weed-fs/go/glog"
"github.com/chrislusf/weed-fs/go/operation"
"github.com/chrislusf/weed-fs/go/storage"
"github.com/chrislusf/weed-fs/go/util"
- "net/http"
- "strconv"
)
func ReplicatedWrite(masterNode string, s *storage.Store, volumeId storage.VolumeId, needle *storage.Needle, r *http.Request) (size uint32, errorStatus string) {
diff --git a/go/topology/topology.go b/go/topology/topology.go
index cfce0c9a8..eb64d336c 100644
--- a/go/topology/topology.go
+++ b/go/topology/topology.go
@@ -1,14 +1,15 @@
package topology
import (
+ "errors"
+ "io/ioutil"
+ "math/rand"
+
"github.com/chrislusf/weed-fs/go/glog"
"github.com/chrislusf/weed-fs/go/operation"
"github.com/chrislusf/weed-fs/go/sequence"
"github.com/chrislusf/weed-fs/go/storage"
- "errors"
"github.com/goraft/raft"
- "io/ioutil"
- "math/rand"
)
type Topology struct {
diff --git a/go/topology/topology_event_handling.go b/go/topology/topology_event_handling.go
index eb4491484..7e36568b6 100644
--- a/go/topology/topology_event_handling.go
+++ b/go/topology/topology_event_handling.go
@@ -1,10 +1,11 @@
package topology
import (
- "github.com/chrislusf/weed-fs/go/glog"
- "github.com/chrislusf/weed-fs/go/storage"
"math/rand"
"time"
+
+ "github.com/chrislusf/weed-fs/go/glog"
+ "github.com/chrislusf/weed-fs/go/storage"
)
func (t *Topology) StartRefreshWritableVolumes(garbageThreshold string) {
diff --git a/go/topology/topology_map.go b/go/topology/topology_map.go
index d6400c988..af95c6536 100644
--- a/go/topology/topology_map.go
+++ b/go/topology/topology_map.go
@@ -1,7 +1,5 @@
package topology
-import ()
-
func (t *Topology) ToMap() interface{} {
m := make(map[string]interface{})
m["Max"] = t.GetMaxVolumeCount()
diff --git a/go/topology/topology_vacuum.go b/go/topology/topology_vacuum.go
index 72846f20b..97a76026d 100644
--- a/go/topology/topology_vacuum.go
+++ b/go/topology/topology_vacuum.go
@@ -1,13 +1,14 @@
package topology
import (
- "github.com/chrislusf/weed-fs/go/glog"
- "github.com/chrislusf/weed-fs/go/storage"
- "github.com/chrislusf/weed-fs/go/util"
"encoding/json"
"errors"
"net/url"
"time"
+
+ "github.com/chrislusf/weed-fs/go/glog"
+ "github.com/chrislusf/weed-fs/go/storage"
+ "github.com/chrislusf/weed-fs/go/util"
)
func batchVacuumVolumeCheck(vl *VolumeLayout, vid storage.VolumeId, locationlist *VolumeLocationList, garbageThreshold string) bool {
diff --git a/go/topology/volume_growth.go b/go/topology/volume_growth.go
index 2859d3992..b1f241990 100644
--- a/go/topology/volume_growth.go
+++ b/go/topology/volume_growth.go
@@ -1,11 +1,12 @@
package topology
import (
- "github.com/chrislusf/weed-fs/go/glog"
- "github.com/chrislusf/weed-fs/go/storage"
"fmt"
"math/rand"
"sync"
+
+ "github.com/chrislusf/weed-fs/go/glog"
+ "github.com/chrislusf/weed-fs/go/storage"
)
/*
diff --git a/go/topology/volume_growth_test.go b/go/topology/volume_growth_test.go
index 5581c87ce..267b36042 100644
--- a/go/topology/volume_growth_test.go
+++ b/go/topology/volume_growth_test.go
@@ -1,11 +1,12 @@
package topology
import (
- "github.com/chrislusf/weed-fs/go/sequence"
- "github.com/chrislusf/weed-fs/go/storage"
"encoding/json"
"fmt"
"testing"
+
+ "github.com/chrislusf/weed-fs/go/sequence"
+ "github.com/chrislusf/weed-fs/go/storage"
)
var topologyLayout = `
diff --git a/go/topology/volume_layout.go b/go/topology/volume_layout.go
index 7bb0cf7e3..de72bf895 100644
--- a/go/topology/volume_layout.go
+++ b/go/topology/volume_layout.go
@@ -1,11 +1,12 @@
package topology
import (
- "github.com/chrislusf/weed-fs/go/glog"
- "github.com/chrislusf/weed-fs/go/storage"
"errors"
"math/rand"
"sync"
+
+ "github.com/chrislusf/weed-fs/go/glog"
+ "github.com/chrislusf/weed-fs/go/storage"
)
// mapping from volume to its locations, inverted from server to volume
diff --git a/go/topology/volume_location_list.go b/go/topology/volume_location_list.go
index 176f469b9..011614013 100644
--- a/go/topology/volume_location_list.go
+++ b/go/topology/volume_location_list.go
@@ -1,7 +1,5 @@
package topology
-import ()
-
type VolumeLocationList struct {
list []*DataNode
}
diff --git a/go/util/config.go b/go/util/config.go
index 050fd0e64..4cf1d7c64 100644
--- a/go/util/config.go
+++ b/go/util/config.go
@@ -10,9 +10,10 @@ package util
import (
"bytes"
- "github.com/chrislusf/weed-fs/go/glog"
"encoding/json"
"os"
+
+ "github.com/chrislusf/weed-fs/go/glog"
)
type Config struct {
diff --git a/go/util/constants.go b/go/util/constants.go
index db1ca38e5..c407533a8 100644
--- a/go/util/constants.go
+++ b/go/util/constants.go
@@ -1,7 +1,5 @@
package util
-import ()
-
const (
VERSION = "0.64"
)
diff --git a/go/util/file_util.go b/go/util/file_util.go
index 412d98458..30e24f001 100644
--- a/go/util/file_util.go
+++ b/go/util/file_util.go
@@ -2,9 +2,10 @@ package util
import (
"bufio"
- "github.com/chrislusf/weed-fs/go/glog"
"errors"
"os"
+
+ "github.com/chrislusf/weed-fs/go/glog"
)
func TestFolderWritable(folder string) (err error) {
diff --git a/go/util/net_timeout.go b/go/util/net_timeout.go
index eb80822b5..f274e4802 100644
--- a/go/util/net_timeout.go
+++ b/go/util/net_timeout.go
@@ -1,9 +1,10 @@
package util
import (
- "github.com/chrislusf/weed-fs/go/stats"
"net"
"time"
+
+ "github.com/chrislusf/weed-fs/go/stats"
)
// Listener wraps a net.Listener, and gives a place to store the timeout
diff --git a/go/weed/benchmark.go b/go/weed/benchmark.go
index fec8472e5..8339913cd 100644
--- a/go/weed/benchmark.go
+++ b/go/weed/benchmark.go
@@ -2,9 +2,6 @@ package main
import (
"bufio"
- "github.com/chrislusf/weed-fs/go/glog"
- "github.com/chrislusf/weed-fs/go/operation"
- "github.com/chrislusf/weed-fs/go/util"
"fmt"
"io"
"math"
@@ -16,6 +13,10 @@ import (
"strings"
"sync"
"time"
+
+ "github.com/chrislusf/weed-fs/go/glog"
+ "github.com/chrislusf/weed-fs/go/operation"
+ "github.com/chrislusf/weed-fs/go/util"
)
type BenchmarkOptions struct {
diff --git a/go/weed/download.go b/go/weed/download.go
index c30d17915..c782654f5 100644
--- a/go/weed/download.go
+++ b/go/weed/download.go
@@ -1,14 +1,15 @@
package main
import (
- "github.com/chrislusf/weed-fs/go/operation"
- "github.com/chrislusf/weed-fs/go/util"
"fmt"
"io"
"io/ioutil"
"os"
"path"
"strings"
+
+ "github.com/chrislusf/weed-fs/go/operation"
+ "github.com/chrislusf/weed-fs/go/util"
)
var (
diff --git a/go/weed/export.go b/go/weed/export.go
index 9f33d852f..c9cc0e3fe 100644
--- a/go/weed/export.go
+++ b/go/weed/export.go
@@ -4,14 +4,15 @@ import (
"archive/tar"
"bytes"
"fmt"
- "github.com/chrislusf/weed-fs/go/glog"
- "github.com/chrislusf/weed-fs/go/storage"
"os"
"path"
"strconv"
"strings"
"text/template"
"time"
+
+ "github.com/chrislusf/weed-fs/go/glog"
+ "github.com/chrislusf/weed-fs/go/storage"
)
func init() {
diff --git a/go/weed/filer.go b/go/weed/filer.go
index 7dbecb4d0..b3fc9c878 100644
--- a/go/weed/filer.go
+++ b/go/weed/filer.go
@@ -1,13 +1,14 @@
package main
import (
- "github.com/chrislusf/weed-fs/go/glog"
- "github.com/chrislusf/weed-fs/go/util"
- "github.com/chrislusf/weed-fs/go/weed/weed_server"
"net/http"
"os"
"strconv"
"time"
+
+ "github.com/chrislusf/weed-fs/go/glog"
+ "github.com/chrislusf/weed-fs/go/util"
+ "github.com/chrislusf/weed-fs/go/weed/weed_server"
)
var (
diff --git a/go/weed/fix.go b/go/weed/fix.go
index ad573875a..9c8026448 100644
--- a/go/weed/fix.go
+++ b/go/weed/fix.go
@@ -1,11 +1,12 @@
package main
import (
- "github.com/chrislusf/weed-fs/go/glog"
- "github.com/chrislusf/weed-fs/go/storage"
"os"
"path"
"strconv"
+
+ "github.com/chrislusf/weed-fs/go/glog"
+ "github.com/chrislusf/weed-fs/go/storage"
)
func init() {
diff --git a/go/weed/master.go b/go/weed/master.go
index f96ff4c08..f88964b6d 100644
--- a/go/weed/master.go
+++ b/go/weed/master.go
@@ -1,16 +1,17 @@
package main
import (
- "github.com/chrislusf/weed-fs/go/glog"
- "github.com/chrislusf/weed-fs/go/util"
- "github.com/chrislusf/weed-fs/go/weed/weed_server"
- "github.com/gorilla/mux"
"net/http"
"os"
"runtime"
"strconv"
"strings"
"time"
+
+ "github.com/chrislusf/weed-fs/go/glog"
+ "github.com/chrislusf/weed-fs/go/util"
+ "github.com/chrislusf/weed-fs/go/weed/weed_server"
+ "github.com/gorilla/mux"
)
func init() {
diff --git a/go/weed/mount.go b/go/weed/mount.go
index 0290e0f53..66e645387 100644
--- a/go/weed/mount.go
+++ b/go/weed/mount.go
@@ -1,7 +1,5 @@
package main
-import ()
-
type MountOptions struct {
filer *string
dir *string
diff --git a/go/weed/mount_std.go b/go/weed/mount_std.go
index e5fc0986c..808c6c563 100644
--- a/go/weed/mount_std.go
+++ b/go/weed/mount_std.go
@@ -3,15 +3,16 @@
package main
import (
+ "fmt"
+ "os"
+ "runtime"
+
"bazil.org/fuse"
"bazil.org/fuse/fs"
"github.com/chrislusf/weed-fs/go/filer"
"github.com/chrislusf/weed-fs/go/glog"
"github.com/chrislusf/weed-fs/go/storage"
"github.com/chrislusf/weed-fs/go/util"
- "fmt"
- "os"
- "runtime"
)
func runMount(cmd *Command, args []string) bool {
diff --git a/go/weed/server.go b/go/weed/server.go
index 1d854d641..6042c22e7 100644
--- a/go/weed/server.go
+++ b/go/weed/server.go
@@ -1,10 +1,6 @@
package main
import (
- "github.com/chrislusf/weed-fs/go/glog"
- "github.com/chrislusf/weed-fs/go/util"
- "github.com/chrislusf/weed-fs/go/weed/weed_server"
- "github.com/gorilla/mux"
"net/http"
"os"
"runtime"
@@ -13,6 +9,11 @@ import (
"strings"
"sync"
"time"
+
+ "github.com/chrislusf/weed-fs/go/glog"
+ "github.com/chrislusf/weed-fs/go/util"
+ "github.com/chrislusf/weed-fs/go/weed/weed_server"
+ "github.com/gorilla/mux"
)
type ServerOptions struct {
diff --git a/go/weed/shell.go b/go/weed/shell.go
index c8043e0dd..f2c4990ea 100644
--- a/go/weed/shell.go
+++ b/go/weed/shell.go
@@ -2,9 +2,10 @@ package main
import (
"bufio"
- "github.com/chrislusf/weed-fs/go/glog"
"fmt"
"os"
+
+ "github.com/chrislusf/weed-fs/go/glog"
)
func init() {
diff --git a/go/weed/signal_handling_notsupported.go b/go/weed/signal_handling_notsupported.go
index ad4f37b0c..343cf7de2 100644
--- a/go/weed/signal_handling_notsupported.go
+++ b/go/weed/signal_handling_notsupported.go
@@ -2,7 +2,5 @@
package main
-import ()
-
func OnInterrupt(fn func()) {
}
diff --git a/go/weed/upload.go b/go/weed/upload.go
index 4eae4d274..2d67c0bd9 100644
--- a/go/weed/upload.go
+++ b/go/weed/upload.go
@@ -1,11 +1,12 @@
package main
import (
- "github.com/chrislusf/weed-fs/go/operation"
"encoding/json"
"fmt"
"os"
"path/filepath"
+
+ "github.com/chrislusf/weed-fs/go/operation"
)
var (
diff --git a/go/weed/version.go b/go/weed/version.go
index 63441509e..8d3a6fed7 100644
--- a/go/weed/version.go
+++ b/go/weed/version.go
@@ -1,9 +1,10 @@
package main
import (
- "github.com/chrislusf/weed-fs/go/util"
"fmt"
"runtime"
+
+ "github.com/chrislusf/weed-fs/go/util"
)
var cmdVersion = &Command{
diff --git a/go/weed/volume.go b/go/weed/volume.go
index ce05fcdf3..212cb4b33 100644
--- a/go/weed/volume.go
+++ b/go/weed/volume.go
@@ -1,15 +1,16 @@
package main
import (
- "github.com/chrislusf/weed-fs/go/glog"
- "github.com/chrislusf/weed-fs/go/util"
- "github.com/chrislusf/weed-fs/go/weed/weed_server"
"net/http"
"os"
"runtime"
"strconv"
"strings"
"time"
+
+ "github.com/chrislusf/weed-fs/go/glog"
+ "github.com/chrislusf/weed-fs/go/util"
+ "github.com/chrislusf/weed-fs/go/weed/weed_server"
)
func init() {
diff --git a/go/weed/volume_test.go b/go/weed/volume_test.go
index 764362a2b..ef00a8c7c 100644
--- a/go/weed/volume_test.go
+++ b/go/weed/volume_test.go
@@ -1,10 +1,11 @@
package main
import (
- "github.com/chrislusf/weed-fs/go/glog"
"net/http"
"testing"
"time"
+
+ "github.com/chrislusf/weed-fs/go/glog"
)
func TestXYZ(t *testing.T) {
diff --git a/go/weed/weed.go b/go/weed/weed.go
index c1f5a72de..c304b7f35 100644
--- a/go/weed/weed.go
+++ b/go/weed/weed.go
@@ -1,7 +1,6 @@
package main
import (
- "github.com/chrislusf/weed-fs/go/glog"
"flag"
"fmt"
"io"
@@ -13,6 +12,8 @@ import (
"time"
"unicode"
"unicode/utf8"
+
+ "github.com/chrislusf/weed-fs/go/glog"
)
var IsDebug *bool
diff --git a/go/weed/weed_server/common.go b/go/weed/weed_server/common.go
index 816107dc5..39b0830e3 100644
--- a/go/weed/weed_server/common.go
+++ b/go/weed/weed_server/common.go
@@ -2,11 +2,6 @@ package weed_server
import (
"bytes"
- "github.com/chrislusf/weed-fs/go/glog"
- "github.com/chrislusf/weed-fs/go/operation"
- "github.com/chrislusf/weed-fs/go/stats"
- "github.com/chrislusf/weed-fs/go/storage"
- "github.com/chrislusf/weed-fs/go/util"
"encoding/json"
"fmt"
"net"
@@ -14,6 +9,12 @@ import (
"path/filepath"
"strconv"
"strings"
+
+ "github.com/chrislusf/weed-fs/go/glog"
+ "github.com/chrislusf/weed-fs/go/operation"
+ "github.com/chrislusf/weed-fs/go/stats"
+ "github.com/chrislusf/weed-fs/go/storage"
+ "github.com/chrislusf/weed-fs/go/util"
)
var serverStats *stats.ServerStats
diff --git a/go/weed/weed_server/filer_server.go b/go/weed/weed_server/filer_server.go
index 5ff0ed986..9d6f7c71b 100644
--- a/go/weed/weed_server/filer_server.go
+++ b/go/weed/weed_server/filer_server.go
@@ -1,10 +1,11 @@
package weed_server
import (
- "github.com/chrislusf/weed-fs/go/filer"
- "github.com/chrislusf/weed-fs/go/glog"
"net/http"
"strconv"
+
+ "github.com/chrislusf/weed-fs/go/filer"
+ "github.com/chrislusf/weed-fs/go/glog"
)
type FilerServer struct {
diff --git a/go/weed/weed_server/filer_server_handlers.go b/go/weed/weed_server/filer_server_handlers.go
index e36e7c310..781d7c0fc 100644
--- a/go/weed/weed_server/filer_server_handlers.go
+++ b/go/weed/weed_server/filer_server_handlers.go
@@ -1,12 +1,8 @@
package weed_server
import (
- "github.com/chrislusf/weed-fs/go/glog"
- "github.com/chrislusf/weed-fs/go/operation"
- "github.com/chrislusf/weed-fs/go/util"
"encoding/json"
"errors"
- "github.com/syndtr/goleveldb/leveldb"
"io"
"io/ioutil"
"math/rand"
@@ -14,6 +10,11 @@ import (
"net/url"
"strconv"
"strings"
+
+ "github.com/chrislusf/weed-fs/go/glog"
+ "github.com/chrislusf/weed-fs/go/operation"
+ "github.com/chrislusf/weed-fs/go/util"
+ "github.com/syndtr/goleveldb/leveldb"
)
func (fs *FilerServer) filerHandler(w http.ResponseWriter, r *http.Request) {
diff --git a/go/weed/weed_server/filer_server_handlers_admin.go b/go/weed/weed_server/filer_server_handlers_admin.go
index ff52dff24..5ba12e0b8 100644
--- a/go/weed/weed_server/filer_server_handlers_admin.go
+++ b/go/weed/weed_server/filer_server_handlers_admin.go
@@ -1,8 +1,9 @@
package weed_server
import (
- "github.com/chrislusf/weed-fs/go/glog"
"net/http"
+
+ "github.com/chrislusf/weed-fs/go/glog"
)
/*
diff --git a/go/weed/weed_server/master_server.go b/go/weed/weed_server/master_server.go
index 401f6cfdb..d000cb610 100644
--- a/go/weed/weed_server/master_server.go
+++ b/go/weed/weed_server/master_server.go
@@ -1,16 +1,17 @@
package weed_server
import (
+ "net/http"
+ "net/http/httputil"
+ "net/url"
+ "sync"
+
"github.com/chrislusf/weed-fs/go/glog"
"github.com/chrislusf/weed-fs/go/sequence"
"github.com/chrislusf/weed-fs/go/topology"
"github.com/chrislusf/weed-fs/go/util"
"github.com/goraft/raft"
"github.com/gorilla/mux"
- "net/http"
- "net/http/httputil"
- "net/url"
- "sync"
)
type MasterServer struct {
diff --git a/go/weed/weed_server/master_server_handlers.go b/go/weed/weed_server/master_server_handlers.go
index d7f1f4ce3..7a7a3b70d 100644
--- a/go/weed/weed_server/master_server_handlers.go
+++ b/go/weed/weed_server/master_server_handlers.go
@@ -1,12 +1,13 @@
package weed_server
import (
- "github.com/chrislusf/weed-fs/go/operation"
- "github.com/chrislusf/weed-fs/go/stats"
- "github.com/chrislusf/weed-fs/go/storage"
"net/http"
"strconv"
"strings"
+
+ "github.com/chrislusf/weed-fs/go/operation"
+ "github.com/chrislusf/weed-fs/go/stats"
+ "github.com/chrislusf/weed-fs/go/storage"
)
func (ms *MasterServer) lookupVolumeId(vids []string, collection string) (volumeLocations map[string]operation.LookupResult) {
diff --git a/go/weed/weed_server/master_server_handlers_admin.go b/go/weed/weed_server/master_server_handlers_admin.go
index 1a2c6b8e0..d7124e567 100644
--- a/go/weed/weed_server/master_server_handlers_admin.go
+++ b/go/weed/weed_server/master_server_handlers_admin.go
@@ -1,18 +1,19 @@
package weed_server
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/storage"
- "github.com/chrislusf/weed-fs/go/topology"
- "github.com/chrislusf/weed-fs/go/util"
"encoding/json"
"errors"
"io/ioutil"
"net/http"
"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/storage"
+ "github.com/chrislusf/weed-fs/go/topology"
+ "github.com/chrislusf/weed-fs/go/util"
)
func (ms *MasterServer) collectionDeleteHandler(w http.ResponseWriter, r *http.Request) {
diff --git a/go/weed/weed_server/raft_server.go b/go/weed/weed_server/raft_server.go
index e41867076..0b049ce27 100644
--- a/go/weed/weed_server/raft_server.go
+++ b/go/weed/weed_server/raft_server.go
@@ -2,19 +2,20 @@ package weed_server
import (
"bytes"
- "github.com/chrislusf/weed-fs/go/glog"
- "github.com/chrislusf/weed-fs/go/topology"
"encoding/json"
"errors"
"fmt"
- "github.com/goraft/raft"
- "github.com/gorilla/mux"
"io/ioutil"
"math/rand"
"net/http"
"net/url"
"strings"
"time"
+
+ "github.com/chrislusf/weed-fs/go/glog"
+ "github.com/chrislusf/weed-fs/go/topology"
+ "github.com/goraft/raft"
+ "github.com/gorilla/mux"
)
type RaftServer struct {
diff --git a/go/weed/weed_server/raft_server_handlers.go b/go/weed/weed_server/raft_server_handlers.go
index 4d51c0767..b466d9afa 100644
--- a/go/weed/weed_server/raft_server_handlers.go
+++ b/go/weed/weed_server/raft_server_handlers.go
@@ -1,13 +1,14 @@
package weed_server
import (
- "github.com/chrislusf/weed-fs/go/glog"
- "github.com/chrislusf/weed-fs/go/operation"
"encoding/json"
- "github.com/goraft/raft"
"io/ioutil"
"net/http"
"strings"
+
+ "github.com/chrislusf/weed-fs/go/glog"
+ "github.com/chrislusf/weed-fs/go/operation"
+ "github.com/goraft/raft"
)
// Handles incoming RAFT joins.
diff --git a/go/weed/weed_server/volume_server.go b/go/weed/weed_server/volume_server.go
index 2a9085f3b..0a65fd2f6 100644
--- a/go/weed/weed_server/volume_server.go
+++ b/go/weed/weed_server/volume_server.go
@@ -1,12 +1,13 @@
package weed_server
import (
- "github.com/chrislusf/weed-fs/go/glog"
- "github.com/chrislusf/weed-fs/go/storage"
"math/rand"
"net/http"
"strconv"
"time"
+
+ "github.com/chrislusf/weed-fs/go/glog"
+ "github.com/chrislusf/weed-fs/go/storage"
)
type VolumeServer struct {
diff --git a/go/weed/weed_server/volume_server_handlers.go b/go/weed/weed_server/volume_server_handlers.go
index ce14f6a87..83f614941 100644
--- a/go/weed/weed_server/volume_server_handlers.go
+++ b/go/weed/weed_server/volume_server_handlers.go
@@ -1,12 +1,6 @@
package weed_server
import (
- "github.com/chrislusf/weed-fs/go/glog"
- "github.com/chrislusf/weed-fs/go/images"
- "github.com/chrislusf/weed-fs/go/operation"
- "github.com/chrislusf/weed-fs/go/stats"
- "github.com/chrislusf/weed-fs/go/storage"
- "github.com/chrislusf/weed-fs/go/topology"
"io"
"mime"
"mime/multipart"
@@ -14,6 +8,13 @@ import (
"strconv"
"strings"
"time"
+
+ "github.com/chrislusf/weed-fs/go/glog"
+ "github.com/chrislusf/weed-fs/go/images"
+ "github.com/chrislusf/weed-fs/go/operation"
+ "github.com/chrislusf/weed-fs/go/stats"
+ "github.com/chrislusf/weed-fs/go/storage"
+ "github.com/chrislusf/weed-fs/go/topology"
)
var fileNameEscaper = strings.NewReplacer("\\", "\\\\", "\"", "\\\"")
diff --git a/go/weed/weed_server/volume_server_handlers_admin.go b/go/weed/weed_server/volume_server_handlers_admin.go
index 1118c8017..caf4c3be8 100644
--- a/go/weed/weed_server/volume_server_handlers_admin.go
+++ b/go/weed/weed_server/volume_server_handlers_admin.go
@@ -1,11 +1,12 @@
package weed_server
import (
+ "net/http"
+ "path/filepath"
+
"github.com/chrislusf/weed-fs/go/glog"
"github.com/chrislusf/weed-fs/go/stats"
"github.com/chrislusf/weed-fs/go/util"
- "net/http"
- "path/filepath"
)
func (vs *VolumeServer) statusHandler(w http.ResponseWriter, r *http.Request) {
diff --git a/go/weed/weed_server/volume_server_handlers_vacuum.go b/go/weed/weed_server/volume_server_handlers_vacuum.go
index b0600d799..f115e3b8b 100644
--- a/go/weed/weed_server/volume_server_handlers_vacuum.go
+++ b/go/weed/weed_server/volume_server_handlers_vacuum.go
@@ -1,8 +1,9 @@
package weed_server
import (
- "github.com/chrislusf/weed-fs/go/glog"
"net/http"
+
+ "github.com/chrislusf/weed-fs/go/glog"
)
func (vs *VolumeServer) vacuumVolumeCheckHandler(w http.ResponseWriter, r *http.Request) {