Apply suggestions from code review

Co-authored-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
Filip Petkovski
2020-09-09 13:51:27 +02:00
committed by GitHub
co-authored by Stefan Prodan
parent 2c249e2a92
commit 68e4e1cc68
+2 -2
View File
@@ -49,7 +49,7 @@ func NewNewRelicProvider(
accountId, ok := credentials[newrelicAccountIdSecretKey]
if !ok {
return nil, fmt.Errorf("newrelic credentials does not contain " + newrelicAccountIdSecretKey)
return nil, fmt.Errorf("newrelic credentials does not contain the key '%s'", newrelicAccountIdSecretKey)
}
queryEndpoint := fmt.Sprintf("%s/v1/accounts/%s/query", address, accountId)
@@ -61,7 +61,7 @@ func NewNewRelicProvider(
if b, ok := credentials[newrelicQueryKeySecretKey]; ok {
nr.queryKey = string(b)
} else {
return nil, fmt.Errorf("newrelic credentials does not contain " + newrelicQueryKeySecretKey)
return nil, fmt.Errorf("newrelic credentials does not contain the key ''%s", newrelicQueryKeySecretKey)
}
md, err := time.ParseDuration(metricInterval)