forked from TrueCloudLab/neoneo-go
vm: simplify some test code
gosimple: S1017: should replace this `if` statement with an unconditional `strings.TrimPrefix`
This commit is contained in:
parent
7af67d2a3c
commit
de5e61588d
1 changed files with 1 additions and 3 deletions
|
@ -454,8 +454,6 @@ func decodeBytes(data []byte) ([]byte, error) {
|
|||
}
|
||||
|
||||
func decodeHex(s string) ([]byte, error) {
|
||||
if strings.HasPrefix(s, "0x") {
|
||||
s = s[2:]
|
||||
}
|
||||
s = strings.TrimPrefix(s, "0x")
|
||||
return hex.DecodeString(s)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue