Fixed style issues.

This commit is contained in:
Bartek Plotka 2017-01-16 16:45:58 +00:00
parent d7febe97fa
commit 579e33f19a
2 changed files with 6 additions and 7 deletions

View File

@ -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 [<args>]
{{ range $cat, $flags := . }}{{ if ne $cat "." }} == {{ $cat | upper }} =={{ end }}

View File

@ -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)
}
}
}
}