golang Numeric Conversions

Atoi (string to int)

i, err := strconv.Atoi(“-42”)

——————————-

Itoa (int to string).

s := strconv.Itoa(-42)

  ———————

int64 to string

str:= strconv.FormatInt(int64(165), 10)

——————————-

uint64 to string 

lastID := strconv.FormatUint(uint64(5656556666), 10)

——————————–

string to 

uint64

catID, _ := strconv.ParseUint(“string”, 10, 64)


interface return to string 

session.Get(key).(string)