From 00eaa539e333184bdfb73fe3347bc5358de8a551 Mon Sep 17 00:00:00 2001 From: Wolfy-J Date: Sun, 3 Jun 2018 13:00:58 +0300 Subject: go fmt --- http/config.go | 10 +++++----- http/data.go | 2 +- http/request.go | 6 +++--- http/response.go | 2 +- http/server.go | 6 +++--- http/service.go | 2 +- http/static.go | 6 +++--- http/uploads.go | 12 ++++++------ 8 files changed, 23 insertions(+), 23 deletions(-) (limited to 'http') diff --git a/http/config.go b/http/config.go index fe5fab36..2a64dbab 100644 --- a/http/config.go +++ b/http/config.go @@ -1,12 +1,12 @@ package http import ( - "strings" - "path" + "fmt" "github.com/spiral/roadrunner/service" - "os" "github.com/spiral/roadrunner/utils" - "fmt" + "os" + "path" + "strings" ) // Configures RoadRunner HTTP server. @@ -46,7 +46,7 @@ type serviceConfig struct { Host string Port string MaxRequest string - Static struct { + Static struct { Serve bool Root string } diff --git a/http/data.go b/http/data.go index b84150ee..e6b8344f 100644 --- a/http/data.go +++ b/http/data.go @@ -1,8 +1,8 @@ package http import ( - "strings" "net/http" + "strings" ) const maxLevel = 127 diff --git a/http/request.go b/http/request.go index 516deda2..fd483744 100644 --- a/http/request.go +++ b/http/request.go @@ -1,12 +1,12 @@ package http import ( - "net/http" "encoding/json" + "fmt" "github.com/spiral/roadrunner" - "strings" "io/ioutil" - "fmt" + "net/http" + "strings" ) const ( diff --git a/http/response.go b/http/response.go index d35669c4..2736c4ab 100644 --- a/http/response.go +++ b/http/response.go @@ -1,9 +1,9 @@ package http import ( - "net/http" "encoding/json" "github.com/spiral/roadrunner" + "net/http" ) // Response handles PSR7 response logic. diff --git a/http/server.go b/http/server.go index 039dba02..41e39133 100644 --- a/http/server.go +++ b/http/server.go @@ -1,11 +1,11 @@ package http import ( + "errors" + "github.com/sirupsen/logrus" "github.com/spiral/roadrunner" "net/http" "strconv" - "errors" - "github.com/sirupsen/logrus" ) // Service serves http connections to underlying PHP application using PSR-7 protocol. Context will include request headers, @@ -28,7 +28,7 @@ func NewServer(cfg *Config, server *roadrunner.Server) *Server { } // ServeHTTP serve using PSR-7 requests passed to underlying application. Attempts to serve static files first if enabled. -func (srv *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) () { +func (srv *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) { if srv.cfg.ServeStatic && srv.static.serve(w, r) { return } diff --git a/http/service.go b/http/service.go index e38e1a03..7f4261d0 100644 --- a/http/service.go +++ b/http/service.go @@ -1,10 +1,10 @@ package http import ( + "context" "github.com/sirupsen/logrus" "github.com/spiral/roadrunner/service" "net/http" - "context" ) type Service struct { diff --git a/http/static.go b/http/static.go index bfcb87c2..d7030c3f 100644 --- a/http/static.go +++ b/http/static.go @@ -1,12 +1,12 @@ package http import ( - "net/http" - "strings" - "path" "github.com/sirupsen/logrus" + "net/http" "os" + "path" "path/filepath" + "strings" ) var ( diff --git a/http/uploads.go b/http/uploads.go index 370e73e6..468e8a19 100644 --- a/http/uploads.go +++ b/http/uploads.go @@ -1,15 +1,15 @@ package http import ( - "mime/multipart" "encoding/json" - "strings" - "net/http" - "io/ioutil" + "fmt" "io" - "sync" + "io/ioutil" + "mime/multipart" + "net/http" "os" - "fmt" + "strings" + "sync" ) const ( -- cgit v1.2.3