From fe49be41ad8554bac9dec5de627f9ee0cbc40489 Mon Sep 17 00:00:00 2001 From: Saxon Milton Date: Thu, 12 Sep 2019 07:47:46 +0000 Subject: [PATCH] revid: setting revid's config in revid.New --- revid/revid.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/revid/revid.go b/revid/revid.go index 6f697bd0..0f357ebd 100644 --- a/revid/revid.go +++ b/revid/revid.go @@ -119,6 +119,11 @@ type Revid struct { // an error if construction of the new instance was not successful. func New(c Config, ns *netsender.Sender) (*Revid, error) { r := Revid{ns: ns, err: make(chan error)} + err := r.setConfig(c) + if err != nil { + return nil, fmt.Errorf("could not set config, failed with error: %v",err) + } + r.config.Logger.SetLevel(c.LogLevel) go r.handleErrors() return &r, nil }