fix self link error of generic resources in describe command
This commit is contained in:
parent
ed4b25e46e
commit
fa563dce15
@ -224,7 +224,7 @@ func printUnstructuredContent(w PrefixWriter, level int, content map[string]inte
|
||||
if slice.ContainsString(skip, skipExpr, nil) {
|
||||
continue
|
||||
}
|
||||
w.Write(level, fmt.Sprintf("%s:\n", smartLabelFor(field)))
|
||||
w.Write(level, "%s:\n", smartLabelFor(field))
|
||||
printUnstructuredContent(w, level+1, typedValue, skipExpr, skip...)
|
||||
|
||||
case []interface{}:
|
||||
@ -232,13 +232,13 @@ func printUnstructuredContent(w PrefixWriter, level int, content map[string]inte
|
||||
if slice.ContainsString(skip, skipExpr, nil) {
|
||||
continue
|
||||
}
|
||||
w.Write(level, fmt.Sprintf("%s:\n", smartLabelFor(field)))
|
||||
w.Write(level, "%s:\n", smartLabelFor(field))
|
||||
for _, child := range typedValue {
|
||||
switch typedChild := child.(type) {
|
||||
case map[string]interface{}:
|
||||
printUnstructuredContent(w, level+1, typedChild, skipExpr, skip...)
|
||||
default:
|
||||
w.Write(level+1, fmt.Sprintf("%v\n", typedChild))
|
||||
w.Write(level+1, "%v\n", typedChild)
|
||||
}
|
||||
}
|
||||
|
||||
@ -247,7 +247,7 @@ func printUnstructuredContent(w PrefixWriter, level int, content map[string]inte
|
||||
if slice.ContainsString(skip, skipExpr, nil) {
|
||||
continue
|
||||
}
|
||||
w.Write(level, fmt.Sprintf("%s:\t%v\n", smartLabelFor(field), typedValue))
|
||||
w.Write(level, "%s:\t%v\n", smartLabelFor(field), typedValue)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user