Update workflows #99

Merged
vtolstov merged 2 commits from atolstikhin/micro-config-env:master into master 2024-12-15 22:12:19 +03:00
Showing only changes of commit d755c3fcc8 - Show all commits

6
env.go
View File

@ -25,8 +25,12 @@ func (c *envConfig) Options() config.Options {
} }
func (c *envConfig) Init(opts ...options.Option) error { func (c *envConfig) Init(opts ...options.Option) error {
var err error
for _, o := range opts { for _, o := range opts {
o(&c.opts) if err = o(&c.opts); err != nil {
return err
}
} }
if err := config.DefaultBeforeInit(c.opts.Context, c); err != nil && !c.opts.AllowFail { if err := config.DefaultBeforeInit(c.opts.Context, c); err != nil && !c.opts.AllowFail {