From a19b369f9e518e6b89b59a72c82ba3bb687b2a7a Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Tue, 13 Dec 2022 18:14:58 +0000 Subject: [PATCH] labels: avoid lint warning on New() This code is a bit cleaner. Signed-off-by: Bryan Boreham --- model/labels/labels.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/model/labels/labels.go b/model/labels/labels.go index aafba218a..103e8e5c3 100644 --- a/model/labels/labels.go +++ b/model/labels/labels.go @@ -357,9 +357,7 @@ func EmptyLabels() Labels { // The caller has to guarantee that all label names are unique. func New(ls ...Label) Labels { set := make(Labels, 0, len(ls)) - for _, l := range ls { - set = append(set, l) - } + set = append(set, ls...) sort.Sort(set) return set