diff --git a/model/labels/labels_common.go b/model/labels/labels_common.go index a6945a0cae..4d5cee7ed1 100644 --- a/model/labels/labels_common.go +++ b/model/labels/labels_common.go @@ -224,6 +224,7 @@ func (b *Builder) Range(f func(l Label)) { } } +// Contains returns true if the label name n is present in s, otherwise false. func Contains(s []Label, n string) bool { for _, a := range s { if a.Name == n {