[#125] node: Avoid panic when reading config
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
parent
d390f093e0
commit
eb7be82e87
2 changed files with 9 additions and 5 deletions
|
@ -35,7 +35,11 @@ type Prm struct{}
|
|||
// configuration values are read from it.
|
||||
// Otherwise, Config is a degenerate tree.
|
||||
func New(_ Prm, opts ...configViper.Option) *Config {
|
||||
v, o := configViper.CreateViper(opts...)
|
||||
v, o, err := configViper.CreateViper(opts...)
|
||||
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
return &Config{
|
||||
v: v,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue