Skip to content

Commit

Permalink
Fix error checks.
Browse files Browse the repository at this point in the history
  • Loading branch information
Denis Krivak committed Sep 9, 2023
1 parent 13a25b6 commit 9c4baaf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func (c *Collector) collectCMSSystemInfo(
var data CMSystemInfo
err := client.GetMetrics(ctx, FnCMSystemInfo, &data)
if err != nil {
log.Printf("Failed to get CMState: %v", err)
log.Printf("Failed to get CMSSystemInfo: %v", err)
return
}

Expand Down Expand Up @@ -125,7 +125,7 @@ func (c *Collector) collectLANUserTable(

var data LANUserTable
err := client.GetMetrics(ctx, FnLANUserTable, &data)
if err == nil {
if err != nil {
log.Printf("Failed to get LANUserTable: %v", err)
return
}
Expand Down Expand Up @@ -184,7 +184,7 @@ func (c *Collector) collectCMState(

var data CMState
err := client.GetMetrics(ctx, FnCMState, &data)
if err == nil {
if err != nil {
log.Printf("Failed to get CMState: %v", err)
return
}
Expand Down

0 comments on commit 9c4baaf

Please sign in to comment.