Format fixes

This commit is contained in:
Thomas Roehl
2021-11-29 15:32:58 +01:00
parent 6d14e66505
commit 28163f5d2e
5 changed files with 45 additions and 46 deletions

View File

@@ -32,11 +32,11 @@ func (m *NetstatCollector) Init(config []byte) error {
10: "pkts_out",
}
if len(config) > 0 {
err := json.Unmarshal(config, &m.config)
if err != nil {
log.Print(err.Error())
return err
}
err := json.Unmarshal(config, &m.config)
if err != nil {
log.Print(err.Error())
return err
}
}
_, err := ioutil.ReadFile(string(NETSTATFILE))
if err == nil {