Fixed Error return value of ... is not checked (errcheck)

This commit is contained in:
Holger Obermaier
2026-02-05 10:06:34 +01:00
parent ff0cd5803d
commit a77cc19ddb
30 changed files with 284 additions and 219 deletions

View File

@@ -102,7 +102,9 @@ func (m *NfsIOStatCollector) readNfsiostats() map[string]map[string]int64 {
func (m *NfsIOStatCollector) Init(config json.RawMessage) error {
var err error = nil
m.name = "NfsIOStatCollector"
m.setup()
if err := m.setup(); err != nil {
return fmt.Errorf("%s Init(): setup() call failed: %w", m.name, err)
}
m.parallel = true
m.meta = map[string]string{"source": m.name, "group": "NFS", "unit": "bytes"}
m.tags = map[string]string{"type": "node"}