Skip to content

Commit ba2be45

Browse files
committed
[mappings] minor fix
1 parent d7d5bc6 commit ba2be45

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎internal/commands/messages/batch/mappings/mappings.go‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ func ParseColumnMapping(raw string) (map[string]string, error) {
4444
if _, ok := allowed[key]; !ok {
4545
return nil, fmt.Errorf("%w: unsupported mapping field %q", ErrMappingParseFailed, key)
4646
}
47+
if _, exists := result[key]; exists {
48+
return nil, fmt.Errorf("%w: duplicate mapping field %q", ErrMappingParseFailed, key)
49+
}
4750

4851
result[key] = column
4952
}

0 commit comments

Comments
 (0)