diff options
Diffstat (limited to 'service/headers')
-rw-r--r-- | service/headers/config_test.go | 5 | ||||
-rw-r--r-- | service/headers/service.go | 3 | ||||
-rw-r--r-- | service/headers/service_test.go | 9 |
3 files changed, 10 insertions, 7 deletions
diff --git a/service/headers/config_test.go b/service/headers/config_test.go index 6ea02f67..4b7c56df 100644 --- a/service/headers/config_test.go +++ b/service/headers/config_test.go @@ -1,15 +1,16 @@ package headers import ( + "testing" + json "github.com/json-iterator/go" "github.com/spiral/roadrunner/service" "github.com/stretchr/testify/assert" - "testing" ) type mockCfg struct{ cfg string } -func (cfg *mockCfg) Get(name string) service.Config { return nil } +func (cfg *mockCfg) Get(name string) service.Config { return nil } func (cfg *mockCfg) Unmarshal(out interface{}) error { j := json.ConfigCompatibleWithStandardLibrary return j.Unmarshal([]byte(cfg.cfg), out) diff --git a/service/headers/service.go b/service/headers/service.go index 429219d7..a3a9d9da 100644 --- a/service/headers/service.go +++ b/service/headers/service.go @@ -1,9 +1,10 @@ package headers import ( - rrhttp "github.com/spiral/roadrunner/service/http" "net/http" "strconv" + + rrhttp "github.com/spiral/roadrunner/service/http" ) // ID contains default service name. diff --git a/service/headers/service_test.go b/service/headers/service_test.go index a67def02..03a55d1e 100644 --- a/service/headers/service_test.go +++ b/service/headers/service_test.go @@ -1,6 +1,11 @@ package headers import ( + "io/ioutil" + "net/http" + "testing" + "time" + "github.com/cenkalti/backoff/v4" json "github.com/json-iterator/go" "github.com/sirupsen/logrus" @@ -8,10 +13,6 @@ import ( "github.com/spiral/roadrunner/service" rrhttp "github.com/spiral/roadrunner/service/http" "github.com/stretchr/testify/assert" - "io/ioutil" - "net/http" - "testing" - "time" ) type testCfg struct { |