Merge pull request #334 from shmsr/error-small-case

Error strings shouldn't be capitalized
This commit is contained in:
Matthias Rampke 2020-09-07 09:34:11 +02:00 committed by GitHub
commit 477d566101
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -30,12 +30,12 @@ func IPPortFromString(addr string) (*net.IPAddr, int, error) {
}
ip, err := net.ResolveIPAddr("ip", host)
if err != nil {
return nil, 0, fmt.Errorf("Unable to resolve %s: %s", host, err)
return nil, 0, fmt.Errorf("unable to resolve %s: %s", host, err)
}
port, err := strconv.Atoi(portStr)
if err != nil || port < 0 || port > 65535 {
return nil, 0, fmt.Errorf("Bad port %s: %s", portStr, err)
return nil, 0, fmt.Errorf("bad port %s: %s", portStr, err)
}
return ip, port, nil

View file

@ -157,7 +157,7 @@ func (r *Registry) GetCounter(metricName string, labels prometheus.Labels, help
}
if r.MetricConflicts(metricName, metrics.CounterMetricType) {
return nil, fmt.Errorf("Metric with name %s is already registered", metricName)
return nil, fmt.Errorf("metric with name %s is already registered", metricName)
}
var counterVec *prometheus.CounterVec