1
0
mirror of https://github.com/prometheus-community/postgres_exporter.git synced 2025-08-11 02:43:02 +03:00

Fix issues identified by the gometalinters.

This commit is contained in:
Will Rouesnel
2017-06-06 23:26:32 +10:00
parent 4477dfa9b3
commit 34ffcb449d
5 changed files with 127 additions and 116 deletions

View File

@@ -47,9 +47,9 @@ func (s *FunctionalSuite) TestSemanticVersionColumnDiscard(c *C) {
{
// Update the map so the discard metric should be eliminated
discardable_metric := testMetricMap["test_namespace"]["metric_which_discards"]
discardable_metric.supportedVersions = semver.MustParseRange(">0.0.1")
testMetricMap["test_namespace"]["metric_which_discards"] = discardable_metric
discardableMetric := testMetricMap["test_namespace"]["metric_which_discards"]
discardableMetric.supportedVersions = semver.MustParseRange(">0.0.1")
testMetricMap["test_namespace"]["metric_which_discards"] = discardableMetric
// Discard metric should be discarded
resultMap := makeDescMap(semver.MustParse("0.0.1"), testMetricMap)
@@ -67,9 +67,9 @@ func (s *FunctionalSuite) TestSemanticVersionColumnDiscard(c *C) {
{
// Update the map so the discard metric should be kept but has a version
discardable_metric := testMetricMap["test_namespace"]["metric_which_discards"]
discardable_metric.supportedVersions = semver.MustParseRange(">0.0.1")
testMetricMap["test_namespace"]["metric_which_discards"] = discardable_metric
discardableMetric := testMetricMap["test_namespace"]["metric_which_discards"]
discardableMetric.supportedVersions = semver.MustParseRange(">0.0.1")
testMetricMap["test_namespace"]["metric_which_discards"] = discardableMetric
// Discard metric should be discarded
resultMap := makeDescMap(semver.MustParse("0.0.2"), testMetricMap)