mirror of
https://github.com/status-im/consul.git
synced 2025-02-16 07:38:22 +00:00
Merge pull request #2344 from soupdiver/return_error_when_no_logger_is_provided_on_http_server_creation
Returns an error if no logOutput is provided.
This commit is contained in:
commit
906c19769f
@ -43,6 +43,10 @@ type HTTPServer struct {
|
||||
// NewHTTPServers starts new HTTP servers to provide an interface to
|
||||
// the agent.
|
||||
func NewHTTPServers(agent *Agent, config *Config, logOutput io.Writer) ([]*HTTPServer, error) {
|
||||
if logOutput == nil {
|
||||
return nil, fmt.Errorf("Please provide a valid logOutput(io.Writer)")
|
||||
}
|
||||
|
||||
var servers []*HTTPServer
|
||||
|
||||
if config.Ports.HTTPS > 0 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user