honor AllowFail option

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2021-03-05 16:57:37 +03:00
parent b4b743bb49
commit 1cef3ee123

View File

@ -72,7 +72,7 @@ func (c *consulConfig) Init(opts ...config.Option) error {
}
cli, err := api.NewClient(cfg)
if err != nil {
if err != nil && !c.opts.AllowFail {
return err
}