mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
Move formatLabels function to labels package
As the TODO above the function instructed, move formatLables function to labels package.
This commit is contained in:
@@ -23,7 +23,6 @@ import (
|
||||
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
"k8s.io/kubernetes/pkg/api/meta"
|
||||
"k8s.io/kubernetes/pkg/labels"
|
||||
)
|
||||
|
||||
const kubectlAnnotationPrefix = "kubectl.kubernetes.io/"
|
||||
@@ -32,15 +31,6 @@ type NamespaceInfo struct {
|
||||
Namespace string
|
||||
}
|
||||
|
||||
// TODO Move to labels package.
|
||||
func formatLabels(labelMap map[string]string) string {
|
||||
l := labels.Set(labelMap).String()
|
||||
if l == "" {
|
||||
l = "<none>"
|
||||
}
|
||||
return l
|
||||
}
|
||||
|
||||
func listOfImages(spec *api.PodSpec) []string {
|
||||
var images []string
|
||||
for _, container := range spec.Containers {
|
||||
|
||||
Reference in New Issue
Block a user