Problem
Confita doesn't support map types when loading from environment variables:
type Config struct {
Settings map[string][]int `config:"settings"`
}
Current error
Error: failed to parse config: field type 'map' not supported
Proposal
Add support for maps by parsing JSON from env variables:
export SETTINGS='{"key1":[1,2,3],"key2":[4,5,6]}'
export ACT_RECEIPT_UZ_ALLOWED_INVOICE_PAYMENT_METHODS_BY_SERVICES='{7: [1101], 37: [1101], 671: [1101]}'
Benefits
- More flexible configuration options
- Support for complex nested structures
- Consistency with other config libraries (viper, envconfig)
Problem
Confita doesn't support map types when loading from environment variables:
Current error
Proposal
Add support for maps by parsing JSON from env variables:
Benefits