簡體   English   中英

如何用協議緩沖區編組 *big.Int?

[英]How to marshal *big.Int with protocol buffers?

我想在 Go 中創建一個帶有*big.Int的協議緩沖區消息。 最好的方法是什么?

big.Int實現encoding.TextMarshalerhttps://golang.org/pkg/math/big/#Int.MarshalText

...並且您可以輕松地將[]byte序列化為 protobuf。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM