summaryrefslogtreecommitdiff
path: root/vendor/k8s.io/apimachinery/pkg/types/namespacedname.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/k8s.io/apimachinery/pkg/types/namespacedname.go')
-rw-r--r--vendor/k8s.io/apimachinery/pkg/types/namespacedname.go17
1 files changed, 0 insertions, 17 deletions
diff --git a/vendor/k8s.io/apimachinery/pkg/types/namespacedname.go b/vendor/k8s.io/apimachinery/pkg/types/namespacedname.go
index 1e2130da0..88f0de36d 100644
--- a/vendor/k8s.io/apimachinery/pkg/types/namespacedname.go
+++ b/vendor/k8s.io/apimachinery/pkg/types/namespacedname.go
@@ -18,7 +18,6 @@ package types
import (
"fmt"
- "strings"
)
// NamespacedName comprises a resource name, with a mandatory namespace,
@@ -42,19 +41,3 @@ const (
func (n NamespacedName) String() string {
return fmt.Sprintf("%s%c%s", n.Namespace, Separator, n.Name)
}
-
-// NewNamespacedNameFromString parses the provided string and returns a NamespacedName.
-// The expected format is as per String() above.
-// If the input string is invalid, the returned NamespacedName has all empty string field values.
-// This allows a single-value return from this function, while still allowing error checks in the caller.
-// Note that an input string which does not include exactly one Separator is not a valid input (as it could never
-// have neem returned by String() )
-func NewNamespacedNameFromString(s string) NamespacedName {
- nn := NamespacedName{}
- result := strings.Split(s, string(Separator))
- if len(result) == 2 {
- nn.Namespace = result[0]
- nn.Name = result[1]
- }
- return nn
-}