Commit 2b3bb335 authored by Brendan Burns's avatar Brendan Burns

Address comments.

parent 56a1cd76
...@@ -73,10 +73,10 @@ func massageJSONPath(pathExpression string) (string, error) { ...@@ -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], ":")
......
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