Commit fa563dce authored by xilabao's avatar xilabao

fix self link error of generic resources in describe command

parent ed4b25e4
......@@ -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)
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment