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
1 changed files with 1 additions and 1 deletions

View File

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