diff --git a/command/agent/command.go b/command/agent/command.go index 6493ff49c5..f5bdda0121 100644 --- a/command/agent/command.go +++ b/command/agent/command.go @@ -137,7 +137,7 @@ func (c *Command) setupAgent(config *Config, logOutput io.Writer, logWriter *log c.rpcServer = NewAgentRPC(agent, rpcListener, logOutput, logWriter) if config.HTTPAddr != "" { - server, err := NewServer(agent, logOutput, config.HTTPAddr) + server, err := NewHTTPServer(agent, logOutput, config.HTTPAddr) if err != nil { agent.Shutdown() c.Ui.Error(fmt.Sprintf("Error starting http server: %s", err)) diff --git a/command/agent/http.go b/command/agent/http.go index c70527446b..b380494dad 100644 --- a/command/agent/http.go +++ b/command/agent/http.go @@ -19,9 +19,9 @@ type HTTPServer struct { logger *log.Logger } -// NewServer starts a new HTTP server to provide an interface to +// NewHTTPServer starts a new HTTP server to provide an interface to // the agent. -func NewServer(agent *Agent, logOutput io.Writer, bind string) (*HTTPServer, error) { +func NewHTTPServer(agent *Agent, logOutput io.Writer, bind string) (*HTTPServer, error) { // Create the mux mux := http.NewServeMux() diff --git a/command/agent/http_test.go b/command/agent/http_test.go index 1b8b09556f..97117003db 100644 --- a/command/agent/http_test.go +++ b/command/agent/http_test.go @@ -11,7 +11,7 @@ import ( func makeHTTPServer(t *testing.T) (string, *HTTPServer) { conf := nextConfig() dir, agent := makeAgent(t, conf) - server, err := NewServer(agent, agent.logOutput, conf.HTTPAddr) + server, err := NewHTTPServer(agent, agent.logOutput, conf.HTTPAddr) if err != nil { t.Fatalf("err: %v", err) }