我希望将一些代码从 python 移植到 golang。
python中的代码是这样的
to_be_converted = [3, 40, 234, 1, 23, 65, 43, 72, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100]
converted = bytes(to_be_converted)
print(converted)
这导致
b'\x03(\xea\x01\x17A+Hello world'
我正在寻找一种在 golang 中获取此字节对象的方法。
我不介意输入数据是否不同,我只是在寻找一种获取输出的方法。
谢谢
森栏
相关分类