mirror of
https://github.com/hay-kot/homebox.git
synced 2024-11-22 00:25:43 +00:00
make case insensative
This commit is contained in:
parent
c1bcb80860
commit
d1b8b5eea2
1 changed files with 4 additions and 1 deletions
|
@ -8,6 +8,7 @@ import (
|
|||
"encoding/json"
|
||||
"io"
|
||||
"slices"
|
||||
"strings"
|
||||
"sync"
|
||||
)
|
||||
|
||||
|
@ -89,8 +90,10 @@ func (cs *CurrencyRegistry) Slice() []Currency {
|
|||
}
|
||||
|
||||
func (cs *CurrencyRegistry) IsSupported(code string) bool {
|
||||
lower := strings.ToLower(code)
|
||||
|
||||
cs.mu.RLock()
|
||||
defer cs.mu.RUnlock()
|
||||
_, ok := cs.registry[code]
|
||||
_, ok := cs.registry[lower]
|
||||
return ok
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue