forked from mirrors/statsd_exporter
Merge pull request #334 from shmsr/error-small-case
Error strings shouldn't be capitalized
This commit is contained in:
commit
477d566101
2 changed files with 3 additions and 3 deletions
|
@ -30,12 +30,12 @@ func IPPortFromString(addr string) (*net.IPAddr, int, error) {
|
||||||
}
|
}
|
||||||
ip, err := net.ResolveIPAddr("ip", host)
|
ip, err := net.ResolveIPAddr("ip", host)
|
||||||
if err != nil {
|
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)
|
port, err := strconv.Atoi(portStr)
|
||||||
if err != nil || port < 0 || port > 65535 {
|
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
|
return ip, port, nil
|
||||||
|
|
|
@ -157,7 +157,7 @@ func (r *Registry) GetCounter(metricName string, labels prometheus.Labels, help
|
||||||
}
|
}
|
||||||
|
|
||||||
if r.MetricConflicts(metricName, metrics.CounterMetricType) {
|
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
|
var counterVec *prometheus.CounterVec
|
||||||
|
|
Loading…
Reference in a new issue