Has anyone got an idea if there is any inbuilt functionality in Go for converting from any one of the numeric types to its binary number form.
For example, if
This code works on big integers *big.Int :
*big.Int
x := big.NewInt(123) s := fmt.Sprintf("%b", x) // s == "1111011"
because *big.Int implements the fmt.Formatter interface.
Taken from https://stackoverflow.com/a/23317788/871134