这个问题在这里已经有了答案:Howtoparselonghexadecimalstringintouint(1个回答)关闭3年前。我使用下面提到的代码使用go将十六进制值转换为十进制numberStr:=strings.Replace(s,"0x","",-1)numberStr=strings.Replace(numberStr,"0X","",-1)n,err:=strconv.ParseUint(numberStr,16,64)iferr!=nil{panic(err)}returnn十六进制值为:0x340aad21b3b700000但抛出错误:strconv.ParseUin