From 564a7b5b72ba6b08d46f80647d5bb0e98e1b289f Mon Sep 17 00:00:00 2001 From: Daniel Czerwonk Date: Fri, 14 Jan 2022 11:49:52 +0100 Subject: [PATCH] trim strings extracted from descriptions (fixes #51) --- metrics/default_label_strategy.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/metrics/default_label_strategy.go b/metrics/default_label_strategy.go index 9b916ca..b19c872 100644 --- a/metrics/default_label_strategy.go +++ b/metrics/default_label_strategy.go @@ -44,7 +44,7 @@ func labelKeysFromDescription(desc string) (res []string) { continue } - res = append(res, tmp[0]) + res = append(res, strings.TrimSpace(tmp[0])) } return @@ -57,7 +57,7 @@ func labelValuesFromDescription(desc string) (res []string) { continue } - res = append(res, tmp[1]) + res = append(res, strings.TrimSpace(tmp[1])) } return