dongyou2635
dongyou2635
2018-04-10 12:46

如何在Golang中将uint64转换为big.Int?

  • biginteger
  • type-conversion

I was wondering how can I convert a uint64 to big.Int in golang? the shortest way.

I have tried new(big.Int).SetInt64(int64(a uint64 number)).

I don't like it cause it's long, too much nested conversions and I'd rather use a built-in function if it exists.

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

1条回答

为你推荐