From db69ce89f09196f52b94aac4d9262230eb3355d6 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Fri, 21 Sep 2018 01:56:43 -0700 Subject: [PATCH] go fmt --- weed/command/filer_replication.go | 2 +- weed/filer2/filer_notify.go | 2 +- weed/notification/configuration.go | 2 +- weed/replication/notification_kafka.go | 10 +++++----- weed/replication/notifications.go | 2 +- weed/replication/replicator.go | 9 +++++---- weed/replication/sink/fetch_write.go | 7 ++++--- weed/replication/sink/filer_sink.go | 6 +++--- weed/replication/source/filer_source.go | 13 +++++++------ 9 files changed, 28 insertions(+), 25 deletions(-) diff --git a/weed/command/filer_replication.go b/weed/command/filer_replication.go index 967577c72..c5a8b3c84 100644 --- a/weed/command/filer_replication.go +++ b/weed/command/filer_replication.go @@ -2,9 +2,9 @@ package command import ( "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/replication" "github.com/chrislusf/seaweedfs/weed/server" "github.com/spf13/viper" - "github.com/chrislusf/seaweedfs/weed/replication" ) func init() { diff --git a/weed/filer2/filer_notify.go b/weed/filer2/filer_notify.go index b8fe1dbfb..44928516c 100644 --- a/weed/filer2/filer_notify.go +++ b/weed/filer2/filer_notify.go @@ -1,9 +1,9 @@ package filer2 import ( + "github.com/chrislusf/seaweedfs/weed/glog" "github.com/chrislusf/seaweedfs/weed/notification" "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" - "github.com/chrislusf/seaweedfs/weed/glog" ) func (f *Filer) NotifyUpdateEvent(oldEntry, newEntry *Entry, deleteChunks bool) { diff --git a/weed/notification/configuration.go b/weed/notification/configuration.go index 96087987d..e0ba61d58 100644 --- a/weed/notification/configuration.go +++ b/weed/notification/configuration.go @@ -2,9 +2,9 @@ package notification import ( "github.com/chrislusf/seaweedfs/weed/glog" - "github.com/spf13/viper" "github.com/chrislusf/seaweedfs/weed/util" "github.com/golang/protobuf/proto" + "github.com/spf13/viper" ) type MessageQueue interface { diff --git a/weed/replication/notification_kafka.go b/weed/replication/notification_kafka.go index aaf08a96c..d10175757 100644 --- a/weed/replication/notification_kafka.go +++ b/weed/replication/notification_kafka.go @@ -1,17 +1,17 @@ package replication import ( + "fmt" + "github.com/Shopify/sarama" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" "github.com/chrislusf/seaweedfs/weed/util" "github.com/golang/protobuf/proto" - "github.com/chrislusf/seaweedfs/weed/glog" - "fmt" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" ) func init() { - NotificationInputs = append(NotificationInputs, &KafkaInput{ - }) + NotificationInputs = append(NotificationInputs, &KafkaInput{}) } type KafkaInput struct { diff --git a/weed/replication/notifications.go b/weed/replication/notifications.go index ff40c3aad..6ae95d36b 100644 --- a/weed/replication/notifications.go +++ b/weed/replication/notifications.go @@ -1,8 +1,8 @@ package replication import ( - "github.com/chrislusf/seaweedfs/weed/util" "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/util" ) type NotificationInput interface { diff --git a/weed/replication/replicator.go b/weed/replication/replicator.go index add7f5e2b..66d194128 100644 --- a/weed/replication/replicator.go +++ b/weed/replication/replicator.go @@ -1,12 +1,13 @@ package replication import ( - "github.com/chrislusf/seaweedfs/weed/replication/sink" - "github.com/chrislusf/seaweedfs/weed/util" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" - "github.com/chrislusf/seaweedfs/weed/replication/source" "strings" + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/replication/sink" + "github.com/chrislusf/seaweedfs/weed/replication/source" + "github.com/chrislusf/seaweedfs/weed/util" ) type Replicator struct { diff --git a/weed/replication/sink/fetch_write.go b/weed/replication/sink/fetch_write.go index e432aa45c..4408a712e 100644 --- a/weed/replication/sink/fetch_write.go +++ b/weed/replication/sink/fetch_write.go @@ -2,10 +2,11 @@ package sink import ( "context" - "sync" - "strings" "fmt" - "github.com/chrislusf/seaweedfs/weed/glog" + "strings" + "sync" + + "github.com/chrislusf/seaweedfs/weed/glog" "github.com/chrislusf/seaweedfs/weed/operation" "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" "github.com/chrislusf/seaweedfs/weed/util" diff --git a/weed/replication/sink/filer_sink.go b/weed/replication/sink/filer_sink.go index a39402aeb..422bdeabc 100644 --- a/weed/replication/sink/filer_sink.go +++ b/weed/replication/sink/filer_sink.go @@ -1,14 +1,14 @@ package sink import ( - "fmt" "context" + "fmt" - "github.com/chrislusf/seaweedfs/weed/util" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" "github.com/chrislusf/seaweedfs/weed/filer2" "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" "github.com/chrislusf/seaweedfs/weed/replication/source" + "github.com/chrislusf/seaweedfs/weed/util" ) type ReplicationSink interface { diff --git a/weed/replication/source/filer_source.go b/weed/replication/source/filer_source.go index 8d10dc59a..69e74a63c 100644 --- a/weed/replication/source/filer_source.go +++ b/weed/replication/source/filer_source.go @@ -1,14 +1,15 @@ package source import ( - "io" - "github.com/chrislusf/seaweedfs/weed/util" - "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" - "fmt" - "github.com/chrislusf/seaweedfs/weed/glog" - "strings" "context" + "fmt" + "io" "net/http" + "strings" + + "github.com/chrislusf/seaweedfs/weed/glog" + "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" + "github.com/chrislusf/seaweedfs/weed/util" ) type ReplicationSource interface {