gobig (or go home)
gobig is a Go package for useful wrapper functions to make using Go's math/big package easier to use.
This package exists to allow easier usage of Go's math/big package. For instance, using New(int64) instead of big.NewInt(int64) means fewer keystrokes and easier-to-read code, especially with complicated mathematical formulae.
Installation can be achieved by:
-
Use this command to install the package:
go get -u github.com/jtpeller/gobig
-
Import it:
import "github.com/jtpeller/gobig"
-
Then use it! For my use-case, I write a separate file in the same package that needs the functions. This file wraps the functions I need from gobig as private functions. Then, I can access them without any dot operators for even easier readability, less keystrokes, etc.
Example use on my OEIS repo