2024-10-03 23:18:37 发布
网友
我正在将一个现有的Python库转换为Go,并且正在处理一个问题。你知道吗
有没有一个go等价于下面的Python代码?你知道吗
test = "ec033aa702" test.decode('hex')
我一直在看书,但似乎找不到我要找的东西。你知道吗
这对你有用吗?你知道吗
package main import ( "encoding/hex" "fmt" "log" ) func main() { const s = "ec033aa702" decoded, err := hex.DecodeString(s) if err != nil { log.Fatal(err) } fmt.Printf("%s\n", decoded) }
DecodeString
Try it online!
这对你有用吗?你知道吗
DecodeString
Try it online!
相关问题 更多 >
编程相关推荐