Fixes to create sub-command

This commit is contained in:
Richard Marshall
2019-08-21 08:59:21 -07:00
parent e541ff3999
commit 594a06d35b
3 changed files with 25 additions and 6 deletions

View File

@@ -33,6 +33,9 @@ func GlobPatterns(fsys fs.FileSystem, patterns []string) ([]string, error) {
// `key:value` into a map.
func ConvertToMap(input string, kind string) (map[string]string, error) {
result := make(map[string]string)
if input == "" {
return result, nil
}
inputs := strings.Split(input, ",")
for _, input := range inputs {
c := strings.Index(input, ":")