forked from mirrors/homebox
feat: add czech currency (#323)
This commit is contained in:
parent
1f47d96e4c
commit
dc08dbbd7a
4 changed files with 11 additions and 3 deletions
|
@ -145,6 +145,7 @@ const (
|
|||
CurrencyPln Currency = "pln"
|
||||
CurrencyTry Currency = "try"
|
||||
CurrencyRon Currency = "ron"
|
||||
CurrencyCzk Currency = "czk"
|
||||
)
|
||||
|
||||
func (c Currency) String() string {
|
||||
|
@ -154,7 +155,7 @@ func (c Currency) String() string {
|
|||
// CurrencyValidator is a validator for the "currency" field enum values. It is called by the builders before save.
|
||||
func CurrencyValidator(c Currency) error {
|
||||
switch c {
|
||||
case CurrencyUsd, CurrencyEur, CurrencyGbp, CurrencyJpy, CurrencyZar, CurrencyAud, CurrencyNok, CurrencySek, CurrencyDkk, CurrencyInr, CurrencyRmb, CurrencyBgn, CurrencyChf, CurrencyPln, CurrencyTry, CurrencyRon:
|
||||
case CurrencyUsd, CurrencyEur, CurrencyGbp, CurrencyJpy, CurrencyZar, CurrencyAud, CurrencyNok, CurrencySek, CurrencyDkk, CurrencyInr, CurrencyRmb, CurrencyBgn, CurrencyChf, CurrencyPln, CurrencyTry, CurrencyRon, CurrencyCzk:
|
||||
return nil
|
||||
default:
|
||||
return fmt.Errorf("group: invalid enum value for currency field: %q", c)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue