mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-20 03:36:36 +00:00
perf: run perfsprint fixes
Signed-off-by: Ben Reedy <breed808@breed808.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package perflib
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"reflect"
|
||||
"strings"
|
||||
@@ -17,7 +18,7 @@ const (
|
||||
|
||||
func UnmarshalObject(obj *PerfObject, vs interface{}, logger log.Logger) error {
|
||||
if obj == nil {
|
||||
return fmt.Errorf("counter not found")
|
||||
return errors.New("counter not found")
|
||||
}
|
||||
rv := reflect.ValueOf(vs)
|
||||
if rv.Kind() != reflect.Ptr || rv.IsNil() {
|
||||
|
||||
Reference in New Issue
Block a user