mirror of
https://github.com/hay-kot/homebox.git
synced 2024-11-22 08:35: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"
|
"encoding/json"
|
||||||
"io"
|
"io"
|
||||||
"slices"
|
"slices"
|
||||||
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -89,8 +90,10 @@ func (cs *CurrencyRegistry) Slice() []Currency {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cs *CurrencyRegistry) IsSupported(code string) bool {
|
func (cs *CurrencyRegistry) IsSupported(code string) bool {
|
||||||
|
lower := strings.ToLower(code)
|
||||||
|
|
||||||
cs.mu.RLock()
|
cs.mu.RLock()
|
||||||
defer cs.mu.RUnlock()
|
defer cs.mu.RUnlock()
|
||||||
_, ok := cs.registry[code]
|
_, ok := cs.registry[lower]
|
||||||
return ok
|
return ok
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue