We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b57d3e commit 13cf766Copy full SHA for 13cf766
util/util.go
@@ -431,7 +431,8 @@ func GetHexString(data any) string {
431
if reflect.TypeOf(data).Kind() == reflect.Float64 {
432
result = fmt.Sprintf("%x", int64(data.(float64)))
433
} else if reflect.TypeOf(data).Kind() == reflect.String {
434
- result, ok := strings.CutPrefix(data.(string), "0x")
+ var ok bool
435
+ result, ok = strings.CutPrefix(data.(string), "0x")
436
if !ok {
437
result = data.(string)
438
}
0 commit comments