strconv.AppendInt() Function in Golang With Examples
Go language provides inbuilt support to implement conversions to and from string representations of basic data types by strconv Package. This package provides an AppendInt() function which is used to append the string form of the integer val, as generated by FormatInt, to num and returns the extended buffer as shown in the below syntax. To access AppendInt() function you need to import strconv Package in your program.
func AppendInt(num byte, val int64, base int) byte
int value(base 10): -35 int value(base 16): -2c
int value(base 10): 45 Length: 22 Capacity: 48 int value(base 16): 2a Length: 22 Capacity: 48