From bf200457367ef46629fbd5ce6b1de11960ec8e53 Mon Sep 17 00:00:00 2001 From: Clayton Coleman Date: Sun, 22 Jan 2017 02:04:01 -0500 Subject: [PATCH] Change the string serialization of the Nothing selector The previous option was not serializable, and was used in questionable scenarios to represent what we also use Everything() for. The individual context needs to make the decision about everything vs nothing (and nothing has no real concept in our API today) so this seems safe. --- staging/src/k8s.io/apimachinery/pkg/labels/selector.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/staging/src/k8s.io/apimachinery/pkg/labels/selector.go b/staging/src/k8s.io/apimachinery/pkg/labels/selector.go index 501d018707c..8cfa44ba7f2 100644 --- a/staging/src/k8s.io/apimachinery/pkg/labels/selector.go +++ b/staging/src/k8s.io/apimachinery/pkg/labels/selector.go @@ -62,7 +62,7 @@ type nothingSelector struct{} func (n nothingSelector) Matches(_ Labels) bool { return false } func (n nothingSelector) Empty() bool { return false } -func (n nothingSelector) String() string { return "" } +func (n nothingSelector) String() string { return "" } func (n nothingSelector) Add(_ ...Requirement) Selector { return n } func (n nothingSelector) Requirements() (Requirements, bool) { return nil, false }