Return error at Init for skip collectors early

This commit is contained in:
Thomas Roehl
2021-05-14 19:21:16 +02:00
parent 9b59429a93
commit 6b6e28d4c7
9 changed files with 19 additions and 9 deletions

View File

@@ -15,9 +15,10 @@ type MemstatCollector struct {
MetricCollector
}
func (m *MemstatCollector) Init() {
func (m *MemstatCollector) Init() error {
m.name = "MemstatCollector"
m.setup()
return nil
}
func (m *MemstatCollector) Read(interval time.Duration) {