Use strings.Fields

This commit is contained in:
Chance Zibolski 2015-02-19 09:58:55 -08:00 committed by spf13
parent b24b4ff690
commit dace11d497

View File

@ -294,7 +294,7 @@ func ToStringSliceE(i interface{}) ([]string, error) {
case []string: case []string:
return v, nil return v, nil
case string: case string:
return strings.Split(v, " "), nil return strings.Fields(v), nil
default: default:
return a, fmt.Errorf("Unable to Cast %#v to []string", i) return a, fmt.Errorf("Unable to Cast %#v to []string", i)
} }