diff --git a/cmd/prometheus/config.go b/cmd/prometheus/config.go index 568bcaa4d..60b303adf 100644 --- a/cmd/prometheus/config.go +++ b/cmd/prometheus/config.go @@ -27,6 +27,8 @@ import ( "github.com/asaskevich/govalidator" "github.com/prometheus/common/log" + "github.com/prometheus/common/model" + "github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/notifier" "github.com/prometheus/prometheus/promql" "github.com/prometheus/prometheus/storage/local" @@ -34,8 +36,6 @@ import ( "github.com/prometheus/prometheus/storage/local/index" "github.com/prometheus/prometheus/storage/remote" "github.com/prometheus/prometheus/web" - "github.com/prometheus/prometheus/config" - "github.com/prometheus/common/model" ) // cfg contains immutable configuration parameters for a running Prometheus @@ -404,7 +404,6 @@ func parseAlertmanagerURLToConfig(us string) (*config.AlertmanagerConfig, error) return acfg, nil } - var helpTmpl = ` usage: prometheus [] {{ range $cat, $flags := . }}{{ if ne $cat "." }} == {{ $cat | upper }} =={{ end }} diff --git a/cmd/prometheus/config_test.go b/cmd/prometheus/config_test.go index 406243456..a4e396407 100644 --- a/cmd/prometheus/config_test.go +++ b/cmd/prometheus/config_test.go @@ -83,17 +83,17 @@ func TestParse(t *testing.T) { func TestParseAlertmanagerURLToConfig(t *testing.T) { tests := []struct { - url string + url string username string password string }{ { - url: "http://alertmanager.company.com", + url: "http://alertmanager.company.com", username: "", password: "", }, { - url: "https://user:password@alertmanager.company.com", + url: "https://user:password@alertmanager.company.com", username: "user", password: "password", }, @@ -122,4 +122,4 @@ func TestParseAlertmanagerURLToConfig(t *testing.T) { t.Errorf("%d. expected alertmanagerConfig to have basicAuth filled, but was not", i) } } -} \ No newline at end of file +}