Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Module = fx.Options( fx.Provide(func(lc fx.Lifecycle, cfg *Config) (AppSettings, error) { if cfg.LocalesPath == "" || cfg.RegionsPath == "" { return nil, errors.New("locales path or regions path is empty") } m := appsettings.New() lc.Append(fx.Hook{ OnStart: func(ctx context.Context) error { if err := m.LoadLocales(ctx, cfg.LocalesPath); err != nil { return err } return m.LoadRegions(ctx, cfg.RegionsPath) }, }) return m, nil }), )
Functions ¶
This section is empty.
Types ¶
type AppSettings ¶
Click to show internal directories.
Click to hide internal directories.