config: fix panic on multiple Close() (#1374)

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2020-03-19 12:54:59 +03:00
committed by GitHub
parent 40ff6ddfcf
commit cbb958def5
2 changed files with 32 additions and 3 deletions

View File

@@ -44,7 +44,7 @@ func (c *config) Init(opts ...Option) error {
Loader: memory.NewLoader(),
Reader: json.NewReader(),
}
c.exit = make(chan bool)
for _, o := range opts {
o(&c.opts)
}