check for empty label before assigning

This commit is contained in:
juanvallejo 2017-12-11 12:52:29 -05:00
parent bb72237375
commit 80bc560489
No known key found for this signature in database
GPG Key ID: 7D2C958002D6448D

View File

@ -341,6 +341,10 @@ func (b *Builder) LabelSelectorParam(s string) *Builder {
// LabelSelector accepts a selector directly and will filter the resulting list by that object.
// Use LabelSelectorParam instead for user input.
func (b *Builder) LabelSelector(selector string) *Builder {
if len(selector) == 0 {
return b
}
b.labelSelector = &selector
return b
}