Created
July 25, 2019 01:39
-
-
Save cwbak/6fc5bc29e21a89acde6e7bca985c171a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// To decimal string: | |
n := int64(32) | |
str := strconv.FormatInt(n, 10) | |
fmt.Println(str) // Prints "32" | |
// To hexadecimal string: | |
n := int64(32) | |
str := strconv.FormatInt(n, 16) | |
fmt.Println(str) // Prints "20" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment