Conversion de Types en Go
Comment convertir les types en Go
int64 🠮 string
FormatInt
strconv.FormatInt(i int64, base int)
Itoa
strconv.Itoa(i int)
// Itoa is equivalent to FormatInt(int64(i), 10).
string 🠮 int64
ParseInt
strconv.ParseInt(s string, base int, bitSize int)
Atoi
strconv.Atoi(s string)
// Atoi is equivalent to ParseInt(s, 10, 0), converted to type int.
string 🠮 Time
Parse
time.Parse(layout, value string)
ParseInLocation
time.ParseInLocation(layout, value string, loc *Location)
Time 🠮 string
Pour le layout.
Time.Format
var t time.Time
t.Format(layout string)