summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd/rr/cmd/root.go4
-rw-r--r--cmd/rr/http/reload.go2
-rw-r--r--cmd/rr/http/workers.go4
-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
-rw-r--r--server.go6
-rw-r--r--service/bus.go4
-rw-r--r--service/factory.go4
14 files changed, 35 insertions, 35 deletions
diff --git a/cmd/rr/cmd/root.go b/cmd/rr/cmd/root.go
index dc5ab487..23498018 100644
--- a/cmd/rr/cmd/root.go
+++ b/cmd/rr/cmd/root.go
@@ -21,13 +21,13 @@
package cmd
import (
+ "fmt"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/spf13/viper"
- "github.com/spiral/roadrunner/service"
"github.com/spiral/roadrunner/cmd/rr/utils"
+ "github.com/spiral/roadrunner/service"
"os"
- "fmt"
)
// Service bus for all the commands.
diff --git a/cmd/rr/http/reload.go b/cmd/rr/http/reload.go
index 17588d00..4bd847c3 100644
--- a/cmd/rr/http/reload.go
+++ b/cmd/rr/http/reload.go
@@ -21,8 +21,8 @@
package http
import (
- "github.com/spf13/cobra"
"fmt"
+ "github.com/spf13/cobra"
rr "github.com/spiral/roadrunner/cmd/rr/cmd"
)
diff --git a/cmd/rr/http/workers.go b/cmd/rr/http/workers.go
index 22551384..fb34d0b5 100644
--- a/cmd/rr/http/workers.go
+++ b/cmd/rr/http/workers.go
@@ -21,12 +21,12 @@
package http
import (
+ "github.com/olekukonko/tablewriter"
"github.com/spf13/cobra"
+ rr "github.com/spiral/roadrunner/cmd/rr/cmd"
"github.com/spiral/roadrunner/http"
- "github.com/olekukonko/tablewriter"
"os"
"strconv"
- rr "github.com/spiral/roadrunner/cmd/rr/cmd"
)
func init() {
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 (
diff --git a/server.go b/server.go
index ef5bb413..0291b90f 100644
--- a/server.go
+++ b/server.go
@@ -1,9 +1,9 @@
package roadrunner
import (
- "sync"
- "os/exec"
"fmt"
+ "os/exec"
+ "sync"
)
const (
@@ -84,7 +84,7 @@ func (r *Server) Observe(o func(event int, ctx interface{})) {
}
// Pool returns active pool or error.
-func (r *Server) Pool() (Pool) {
+func (r *Server) Pool() Pool {
r.mu.Lock()
defer r.mu.Unlock()
diff --git a/service/bus.go b/service/bus.go
index 40e73c31..66a0847c 100644
--- a/service/bus.go
+++ b/service/bus.go
@@ -1,11 +1,11 @@
package service
import (
+ "github.com/pkg/errors"
"github.com/sirupsen/logrus"
+ "github.com/spiral/goridge"
"net/rpc"
"sync"
- "github.com/spiral/goridge"
- "github.com/pkg/errors"
)
const (
diff --git a/service/factory.go b/service/factory.go
index dbdebc4f..e4a599e6 100644
--- a/service/factory.go
+++ b/service/factory.go
@@ -2,10 +2,10 @@ package service
import (
"github.com/spiral/roadrunner"
- "time"
+ "net"
"os/exec"
"strings"
- "net"
+ "time"
)
type PoolConfig struct {