mirror of
https://github.com/hay-kot/homebox.git
synced 2024-11-22 08:35:43 +00:00
move flag to options namespace
This commit is contained in:
parent
4e608dc054
commit
b92d7f988d
2 changed files with 6 additions and 6 deletions
|
@ -132,16 +132,16 @@ func run(cfg *config.Config) error {
|
||||||
currencies.CollectDefaults(),
|
currencies.CollectDefaults(),
|
||||||
}
|
}
|
||||||
|
|
||||||
if cfg.CurrencyConfig != "" {
|
if cfg.Options.CurrencyConfig != "" {
|
||||||
log.Info().
|
log.Info().
|
||||||
Str("path", cfg.CurrencyConfig).
|
Str("path", cfg.Options.CurrencyConfig).
|
||||||
Msg("loading currency config file")
|
Msg("loading currency config file")
|
||||||
|
|
||||||
content, err := os.ReadFile(cfg.CurrencyConfig)
|
content, err := os.ReadFile(cfg.Options.CurrencyConfig)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal().
|
log.Fatal().
|
||||||
Err(err).
|
Err(err).
|
||||||
Str("path", cfg.CurrencyConfig).
|
Str("path", cfg.Options.CurrencyConfig).
|
||||||
Msg("failed to read currency config file")
|
Msg("failed to read currency config file")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,6 @@ const (
|
||||||
type Config struct {
|
type Config struct {
|
||||||
conf.Version
|
conf.Version
|
||||||
Mode string `yaml:"mode" conf:"default:development"` // development or production
|
Mode string `yaml:"mode" conf:"default:development"` // development or production
|
||||||
CurrencyConfig string `yaml:"currencies"`
|
|
||||||
Web WebConfig `yaml:"web"`
|
Web WebConfig `yaml:"web"`
|
||||||
Storage Storage `yaml:"storage"`
|
Storage Storage `yaml:"storage"`
|
||||||
Log LoggerConf `yaml:"logger"`
|
Log LoggerConf `yaml:"logger"`
|
||||||
|
@ -31,6 +30,7 @@ type Config struct {
|
||||||
type Options struct {
|
type Options struct {
|
||||||
AllowRegistration bool `yaml:"disable_registration" conf:"default:true"`
|
AllowRegistration bool `yaml:"disable_registration" conf:"default:true"`
|
||||||
AutoIncrementAssetID bool `yaml:"auto_increment_asset_id" conf:"default:true"`
|
AutoIncrementAssetID bool `yaml:"auto_increment_asset_id" conf:"default:true"`
|
||||||
|
CurrencyConfig string `yaml:"currencies"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type DebugConf struct {
|
type DebugConf struct {
|
||||||
|
|
Loading…
Reference in a new issue