diff options
Diffstat (limited to 'service/static')
-rw-r--r-- | service/static/config.go | 3 | ||||
-rw-r--r-- | service/static/config_test.go | 3 | ||||
-rw-r--r-- | service/static/service.go | 3 | ||||
-rw-r--r-- | service/static/service_test.go | 15 |
4 files changed, 13 insertions, 11 deletions
diff --git a/service/static/config.go b/service/static/config.go index 3ca20a83..db50c7dd 100644 --- a/service/static/config.go +++ b/service/static/config.go @@ -2,10 +2,11 @@ package static import ( "fmt" - "github.com/spiral/roadrunner/service" "os" "path" "strings" + + "github.com/spiral/roadrunner/service" ) // Config describes file location and controls access to them. diff --git a/service/static/config_test.go b/service/static/config_test.go index 8bf0d372..2bc936bb 100644 --- a/service/static/config_test.go +++ b/service/static/config_test.go @@ -1,10 +1,11 @@ package static import ( + "testing" + json "github.com/json-iterator/go" "github.com/spiral/roadrunner/service" "github.com/stretchr/testify/assert" - "testing" ) type mockCfg struct{ cfg string } diff --git a/service/static/service.go b/service/static/service.go index 95b99860..49dbedab 100644 --- a/service/static/service.go +++ b/service/static/service.go @@ -1,9 +1,10 @@ package static import ( - rrhttp "github.com/spiral/roadrunner/service/http" "net/http" "path" + + rrhttp "github.com/spiral/roadrunner/service/http" ) // ID contains default service name. diff --git a/service/static/service_test.go b/service/static/service_test.go index 842662c9..bbab86c2 100644 --- a/service/static/service_test.go +++ b/service/static/service_test.go @@ -2,18 +2,19 @@ package static import ( "bytes" - json "github.com/json-iterator/go" - "github.com/sirupsen/logrus" - "github.com/sirupsen/logrus/hooks/test" - "github.com/spiral/roadrunner/service" - rrhttp "github.com/spiral/roadrunner/service/http" - "github.com/stretchr/testify/assert" "io" "io/ioutil" "net/http" "os" "testing" "time" + + json "github.com/json-iterator/go" + "github.com/sirupsen/logrus" + "github.com/sirupsen/logrus/hooks/test" + "github.com/spiral/roadrunner/service" + rrhttp "github.com/spiral/roadrunner/service/http" + "github.com/stretchr/testify/assert" ) type testCfg struct { @@ -75,7 +76,6 @@ func Test_Files(t *testing.T) { time.Sleep(time.Second) - b, _, _ := get("http://localhost:8029/sample.txt") assert.Equal(t, "sample", b) c.Stop() @@ -475,7 +475,6 @@ func TestStatic_Headers(t *testing.T) { t.Fatal("can't find output header in response") } - b, err := ioutil.ReadAll(resp.Body) if err != nil { t.Fatal(err) |