From 8df4896deabdab9a50a5ad3c6da6e1c7f05922af Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Sun, 27 Dec 2020 00:59:10 +0300 Subject: Util -> Utils --- plugins/http/plugin.go | 4 ++-- plugins/rpc/config.go | 4 ++-- plugins/server/plugin.go | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'plugins') diff --git a/plugins/http/plugin.go b/plugins/http/plugin.go index f3708ced..2651f305 100644 --- a/plugins/http/plugin.go +++ b/plugins/http/plugin.go @@ -23,7 +23,7 @@ import ( "github.com/spiral/roadrunner/v2/plugins/http/attributes" "github.com/spiral/roadrunner/v2/plugins/logger" "github.com/spiral/roadrunner/v2/plugins/server" - "github.com/spiral/roadrunner/v2/util" + "github.com/spiral/roadrunner/v2/utils" "golang.org/x/net/http2" "golang.org/x/net/http2/h2c" "golang.org/x/sys/cpu" @@ -479,7 +479,7 @@ func (s *Plugin) initHTTP2() error { // serveFCGI starts FastCGI server. func (s *Plugin) serveFCGI() error { - l, err := util.CreateListener(s.cfg.FCGI.Address) + l, err := utils.CreateListener(s.cfg.FCGI.Address) if err != nil { return err } diff --git a/plugins/rpc/config.go b/plugins/rpc/config.go index 719fd5e3..d7531435 100644 --- a/plugins/rpc/config.go +++ b/plugins/rpc/config.go @@ -5,7 +5,7 @@ import ( "net" "strings" - "github.com/spiral/roadrunner/v2/util" + "github.com/spiral/roadrunner/v2/utils" ) // Config defines RPC service config. @@ -35,7 +35,7 @@ func (c *Config) Valid() error { // Listener creates new rpc socket Listener. func (c *Config) Listener() (net.Listener, error) { - return util.CreateListener(c.Listen) + return utils.CreateListener(c.Listen) } // Dialer creates rpc socket Dialer. diff --git a/plugins/server/plugin.go b/plugins/server/plugin.go index 5b023bc6..5d1f26d3 100644 --- a/plugins/server/plugin.go +++ b/plugins/server/plugin.go @@ -18,7 +18,7 @@ import ( "github.com/spiral/roadrunner/v2/pkg/pipe" poolImpl "github.com/spiral/roadrunner/v2/pkg/pool" "github.com/spiral/roadrunner/v2/pkg/socket" - "github.com/spiral/roadrunner/v2/util" + "github.com/spiral/roadrunner/v2/utils" ) const PluginName = "server" @@ -86,12 +86,12 @@ func (server *Plugin) CmdFactory(env Env) (func() *exec.Cmd, error) { } return func() *exec.Cmd { cmd := exec.Command(cmdArgs[0], cmdArgs[1:]...) //nolint:gosec - util.IsolateProcess(cmd) + utils.IsolateProcess(cmd) // if user is not empty, and OS is linux or macos // execute php worker from that particular user if server.cfg.User != "" { - err := util.ExecuteFromUser(cmd, server.cfg.User) + err := utils.ExecuteFromUser(cmd, server.cfg.User) if err != nil { return nil } @@ -154,7 +154,7 @@ func (server *Plugin) initFactory() (worker.Factory, error) { return nil, errors.E(op, errors.Network, errors.Str("invalid DSN (tcp://:6001, unix://file.sock)")) } - lsn, err := util.CreateListener(server.cfg.Relay) + lsn, err := utils.CreateListener(server.cfg.Relay) if err != nil { return nil, errors.E(op, errors.Network, err) } -- cgit v1.2.3