perf: run perfsprint fixes

Signed-off-by: Ben Reedy <breed808@breed808.com>
This commit is contained in:
Ben Reedy
2024-05-13 09:18:14 +10:00
parent a49dee606b
commit 1239fbf719
9 changed files with 34 additions and 28 deletions

View File

@@ -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() {