Skip to content

Commit

Permalink
Remove unmarshalTags from dkron.go
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Castell committed Dec 28, 2018
1 parent 1cf235a commit c9c692c
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions cmd/dkron.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,3 @@ func initConfig() {

dkron.InitLogger(viper.GetString("log-level"), config.NodeName)
}

// unmarshalTags is a utility function which takes a slice of strings in
// key=value format and returns them as a tag mapping.
func unmarshalTags(tags []string) (map[string]string, error) {
result := make(map[string]string)
for _, tag := range tags {
parts := strings.SplitN(tag, "=", 2)
if len(parts) != 2 || len(parts[0]) == 0 {
return nil, fmt.Errorf("Invalid tag: '%s'", tag)
}
result[parts[0]] = parts[1]
}
return result, nil
}

0 comments on commit c9c692c

Please sign in to comment.