Change casing of error messages

Error messages shouldn't be capitalized.

Signed-off-by: subham sarkar <subham.sarkar@guavus.com>
This commit is contained in:
subham sarkar 2020-09-06 16:33:18 +05:30
parent b19217a19b
commit 2c4cda7fb3
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) 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

View file

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