mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-02 00:07:50 +00:00
Fixes golint errors in pkg/labels
This commit is contained in:
parent
1816a63d55
commit
85fa11da93
@ -23,10 +23,11 @@ import (
|
|||||||
|
|
||||||
// Labels allows you to present labels independently from their storage.
|
// Labels allows you to present labels independently from their storage.
|
||||||
type Labels interface {
|
type Labels interface {
|
||||||
|
// Get returns the value identified by the label.
|
||||||
Get(label string) (value string)
|
Get(label string) (value string)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set is a map of label:value. Implements Labels.
|
// Set is a map of label:value. It implements Labels.
|
||||||
type Set map[string]string
|
type Set map[string]string
|
||||||
|
|
||||||
// String returns all labels listed as a human readable string.
|
// String returns all labels listed as a human readable string.
|
||||||
|
@ -87,7 +87,7 @@ func try(selectorPiece, op string) (lhs, rhs string, ok bool) {
|
|||||||
return "", "", false
|
return "", "", false
|
||||||
}
|
}
|
||||||
|
|
||||||
// SelectorFromSet converts a Set into a Selector.
|
// SelectorFromSet returns a Selector which will match exactly the given Set.
|
||||||
func SelectorFromSet(ls Set) Selector {
|
func SelectorFromSet(ls Set) Selector {
|
||||||
var items []Selector
|
var items []Selector
|
||||||
for label, value := range ls {
|
for label, value := range ls {
|
||||||
|
Loading…
Reference in New Issue
Block a user