mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-02 16:29:21 +00:00
Address comments.
This commit is contained in:
parent
56a1cd76cb
commit
2b3bb33569
@ -73,10 +73,10 @@ func massageJSONPath(pathExpression string) (string, error) {
|
|||||||
// NAME API_VERSION
|
// NAME API_VERSION
|
||||||
// foo bar
|
// foo bar
|
||||||
func NewCustomColumnsPrinterFromSpec(spec string) (*CustomColumnsPrinter, error) {
|
func NewCustomColumnsPrinterFromSpec(spec string) (*CustomColumnsPrinter, error) {
|
||||||
parts := strings.Split(spec, ",")
|
if len(spec) == 0 {
|
||||||
if len(parts) == 0 {
|
|
||||||
return nil, fmt.Errorf("custom-columns format specified but no custom columns given")
|
return nil, fmt.Errorf("custom-columns format specified but no custom columns given")
|
||||||
}
|
}
|
||||||
|
parts := strings.Split(spec, ",")
|
||||||
columns := make([]Column, len(parts))
|
columns := make([]Column, len(parts))
|
||||||
for ix := range parts {
|
for ix := range parts {
|
||||||
colSpec := strings.Split(parts[ix], ":")
|
colSpec := strings.Split(parts[ix], ":")
|
||||||
|
Loading…
Reference in New Issue
Block a user