Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions string_to_string.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ func newStringToStringValue(val map[string]string, p *map[string]string) *string
// Set updates the flag value from the given string, adding additional mappings or updating existing ones.
func (s *stringToStringValue) Set(val string) error {
var ss []string
// Allow empty string to reset the map to empty
if val == "" {
for k := range *s.value {
delete(*s.value, k)
}
s.changed = true
return nil
}
n := strings.Count(val, "=")
switch n {
case 0:
Expand Down
Loading