summaryrefslogtreecommitdiff
path: root/http
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2018-06-03 13:00:58 +0300
committerWolfy-J <[email protected]>2018-06-03 13:00:58 +0300
commit00eaa539e333184bdfb73fe3347bc5358de8a551 (patch)
treee323ff9acd8ee769aedcc26e036664dafa6031d0 /http
parentd1290a636e70d1797261c189285cc6fc6310a0be (diff)
go fmt
Diffstat (limited to 'http')
-rw-r--r--http/config.go10
-rw-r--r--http/data.go2
-rw-r--r--http/request.go6
-rw-r--r--http/response.go2
-rw-r--r--http/server.go6
-rw-r--r--http/service.go2
-rw-r--r--http/static.go6
-rw-r--r--http/uploads.go12
8 files changed, 23 insertions, 23 deletions
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 (