From 39efe6358bbad0ef4f1830caaeeb1fa6bdb9193b Mon Sep 17 00:00:00 2001 From: Bjoern Rabenstein Date: Wed, 10 Dec 2014 17:46:56 +0100 Subject: [PATCH] Fix typos and import order. This doesn't make the import order consistend everywhere, just where it was touched by the previous commit. Change-Id: I82fc75f8691da9901c7ceb808e6f6fe8e5d62c0e --- config/config.go | 5 +++-- config/load.go | 3 ++- utility/strconv.go | 2 +- web/api/query.go | 2 +- web/api/targets.go | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/config/config.go b/config/config.go index 10695f550..c3bcbacb9 100644 --- a/config/config.go +++ b/config/config.go @@ -17,13 +17,14 @@ import ( "fmt" "regexp" "time" + "code.google.com/p/goprotobuf/proto" clientmodel "github.com/prometheus/client_golang/model" - pb "github.com/prometheus/prometheus/config/generated" - "github.com/prometheus/prometheus/utility" + + pb "github.com/prometheus/prometheus/config/generated" ) var jobNameRE = regexp.MustCompile("^[a-zA-Z_][a-zA-Z0-9_-]*$") diff --git a/config/load.go b/config/load.go index 740165b43..6d1a807e1 100644 --- a/config/load.go +++ b/config/load.go @@ -17,6 +17,7 @@ import ( "io/ioutil" "code.google.com/p/goprotobuf/proto" + pb "github.com/prometheus/prometheus/config/generated" ) @@ -41,7 +42,7 @@ func LoadFromString(configStr string) (Config, error) { return config, err } -// LoadFromFile returns a config parsed from the file of teh provided name. +// LoadFromFile returns a config parsed from the file of the provided name. func LoadFromFile(fileName string) (Config, error) { configStr, err := ioutil.ReadFile(fileName) if err != nil { diff --git a/utility/strconv.go b/utility/strconv.go index bbcaff26b..b9ab2e00c 100644 --- a/utility/strconv.go +++ b/utility/strconv.go @@ -51,7 +51,7 @@ func DurationToString(duration time.Duration) string { } // StringToDuration parses a string into a time.Duration, assuming that a year -// always has 265d, a week 7d, a day 24h. See DurationToString for problems with +// always has 365d, a week 7d, a day 24h. See DurationToString for problems with // that. func StringToDuration(durationStr string) (duration time.Duration, err error) { matches := durationRE.FindStringSubmatch(durationStr) diff --git a/web/api/query.go b/web/api/query.go index 52043adfa..d8dd9cf0e 100644 --- a/web/api/query.go +++ b/web/api/query.go @@ -149,7 +149,7 @@ func (serv MetricsService) QueryRange(w http.ResponseWriter, r *http.Request) { fmt.Fprint(w, result) } -// Metrics handles the /api/metrics endpaint. +// Metrics handles the /api/metrics endpoint. func (serv MetricsService) Metrics(w http.ResponseWriter, r *http.Request) { setAccessControlHeaders(w) diff --git a/web/api/targets.go b/web/api/targets.go index e920d40c8..f92eef6f1 100644 --- a/web/api/targets.go +++ b/web/api/targets.go @@ -23,7 +23,7 @@ import ( "github.com/prometheus/prometheus/web/httputils" ) -// TargetGroup bundles endpaints and base labels with appropriate JSON +// TargetGroup bundles endpoints and base labels with appropriate JSON // annotations. type TargetGroup struct { Endpoints []string `json:"endpoints"`