From be7e9c805fa0327030ab91c41fdc3b8f24af3e14 Mon Sep 17 00:00:00 2001 From: oif Date: Tue, 17 Oct 2017 13:36:19 +0800 Subject: [PATCH] MOD: Modify imports sequence --- cmd/apexd/main.go | 5 +++-- pkg/config/config.go | 3 ++- pkg/config/config_test.go | 1 + pkg/inbound/v1/server.go | 3 ++- plugin/cache/plugin.go | 3 ++- plugin/statistics/plugin.go | 3 ++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/cmd/apexd/main.go b/cmd/apexd/main.go index ba51cfa..eb02c29 100644 --- a/cmd/apexd/main.go +++ b/cmd/apexd/main.go @@ -1,15 +1,16 @@ package main import ( - "github.com/Sirupsen/logrus" inbound "github.com/oif/apex/pkg/inbound/v1" "github.com/oif/apex/plugin/cache" "github.com/oif/apex/plugin/gdns" "github.com/oif/apex/plugin/statistics" + + log "github.com/Sirupsen/logrus" ) func main() { - logrus.SetLevel(logrus.DebugLevel) + log.SetLevel(log.DebugLevel) s := new(inbound.Server) s.ListenAddress = ":53" s.ListenProtocol = []string{"udp"} diff --git a/pkg/config/config.go b/pkg/config/config.go index 00098ed..beadc1e 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -4,8 +4,9 @@ import ( "fmt" "os" - "github.com/BurntSushi/toml" "github.com/oif/apex/pkg/types" + + "github.com/BurntSushi/toml" ) const ( diff --git a/pkg/config/config_test.go b/pkg/config/config_test.go index 202b6d1..62b0861 100644 --- a/pkg/config/config_test.go +++ b/pkg/config/config_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/oif/apex/pkg/types" + "github.com/stretchr/testify/assert" ) diff --git a/pkg/inbound/v1/server.go b/pkg/inbound/v1/server.go index 3b2c298..d13588a 100644 --- a/pkg/inbound/v1/server.go +++ b/pkg/inbound/v1/server.go @@ -4,9 +4,10 @@ import ( "sync" "time" + plugin "github.com/oif/apex/pkg/plugin/v1" + log "github.com/Sirupsen/logrus" "github.com/miekg/dns" - plugin "github.com/oif/apex/pkg/plugin/v1" "github.com/sony/sonyflake" ) diff --git a/plugin/cache/plugin.go b/plugin/cache/plugin.go index 4e69f33..1179c2b 100644 --- a/plugin/cache/plugin.go +++ b/plugin/cache/plugin.go @@ -1,8 +1,9 @@ package cache import ( - "github.com/coocood/freecache" plugin "github.com/oif/apex/pkg/plugin/v1" + + "github.com/coocood/freecache" ) // PluginName for g.Name diff --git a/plugin/statistics/plugin.go b/plugin/statistics/plugin.go index f17bd88..a478d5b 100644 --- a/plugin/statistics/plugin.go +++ b/plugin/statistics/plugin.go @@ -3,8 +3,9 @@ package statistics import ( "time" - "github.com/Sirupsen/logrus" plugin "github.com/oif/apex/pkg/plugin/v1" + + "github.com/Sirupsen/logrus" ) // PluginName for g.Name