fix lint
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
e943421543
commit
56bfb287f4
6
env.go
6
env.go
@ -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 {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user