标签: go
golang中是否有类似tuple的结构:
tuple
我的实际需求是实现跨语言的hessian2之类的序列化和反序列化协议。我会写这样的东西:
# python side a = {(1, 2, 3): "123"} bytes = serialize(a)
// go side b := deserialize(bytes) // b == map[[]interface{}]interface{}{[]interface{1, 2, 3}: "123"}