mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2026-02-13 06:31:46 +01:00
Fixed Error return value of ... is not checked (errcheck)
This commit is contained in:
@@ -50,7 +50,9 @@ func (m *SchedstatCollector) Init(config json.RawMessage) error {
|
||||
// Always set the name early in Init() to use it in cclog.Component* functions
|
||||
m.name = "SchedstatCollector"
|
||||
// This is for later use, also call it early
|
||||
m.setup()
|
||||
if err := m.setup(); err != nil {
|
||||
return fmt.Errorf("%s Init(): setup() call failed: %w", m.name, err)
|
||||
}
|
||||
// Tell whether the collector should be run in parallel with others (reading files, ...)
|
||||
// or it should be run serially, mostly for collectors acutally doing measurements
|
||||
// because they should not measure the execution of the other collectors
|
||||
|
||||
Reference in New Issue
Block a user