mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-09 12:07:47 +00:00
Add custom-columns to the template flag
This commit is contained in:
parent
d8c1a9a4fb
commit
601faebfe3
@ -106,7 +106,9 @@ func PrinterForCommand(cmd *cobra.Command) (kubectl.ResourcePrinter, bool, error
|
|||||||
outputFormat = "template"
|
outputFormat = "template"
|
||||||
}
|
}
|
||||||
|
|
||||||
templateFormat := []string{"go-template=", "go-template-file=", "jsonpath=", "jsonpath-file="}
|
templateFormat := []string{
|
||||||
|
"go-template=", "go-template-file=", "jsonpath=", "jsonpath-file=", "custom-columns=", "custom-columns-file=",
|
||||||
|
}
|
||||||
for _, format := range templateFormat {
|
for _, format := range templateFormat {
|
||||||
if strings.HasPrefix(outputFormat, format) {
|
if strings.HasPrefix(outputFormat, format) {
|
||||||
templateFile = outputFormat[len(format):]
|
templateFile = outputFormat[len(format):]
|
||||||
|
Loading…
Reference in New Issue
Block a user