Skip to content

Commit 4597172

Browse files
committed
Use errors instead of fmt
1 parent 2f6add9 commit 4597172

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/util/parse.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
package util
1515

1616
import (
17-
"fmt"
17+
"errors"
1818
"os"
1919
"strconv"
2020
"strings"
@@ -120,7 +120,7 @@ func ReadHexFromFile(path string) (uint64, error) {
120120
}
121121
hexString := strings.TrimSpace(string(data))
122122
if !strings.HasPrefix(hexString, "0x") {
123-
return 0, fmt.Errorf("invalid format: hex string does not start with '0x'")
123+
return 0, errors.New("invalid format: hex string does not start with '0x'")
124124
}
125125
return strconv.ParseUint(hexString[2:], 16, 64)
126126
}

0 commit comments

Comments
 (0)