Skip to content

Commit

Permalink
snmptrapd: allow uppercase unit
Browse files Browse the repository at this point in the history
  • Loading branch information
iqbalaydrus committed Dec 12, 2023
1 parent 6bdc953 commit 848827c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion snmp/snmptrapd.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func (c *Config) GetBufferSize() (int, error) {
return 0, errors.New("empty buffer size")
}
multiplier := 1
switch c.BufferSize[len(c.BufferSize)-1] {
switch strings.ToLower(c.BufferSize)[len(c.BufferSize)-1] {
case 'k':
multiplier = 1e3
case 'm':
Expand Down

0 comments on commit 848827c

Please sign in to comment.