Answers for "golang cast string to interface"

Go
-1

convert string to int golang

var s string
i, err := strconv.Atoi(s)
Posted by: Guest on December-12-2020
0

interface to int golang

iAreaId := val.(int)
iAreaId, ok := val.(int) // Alt. non panicking version
Posted by: Guest on October-12-2020

Code answers related to "golang cast string to interface"

Browse Popular Code Answers by Language