Array to string - https://stackoverflow.com/questions/37532255/one-liner-to-transform-int-into-string
Error Handling in Go that Every Beginner should Know
func Perform() (err error) { defer func() { if r := recover(); r != nil { err = r.(error) } }() GoesWrong() return } func GoesWrong() { panic(errors.New("Fail")) } func main() { err := Perform() fmt.Println(err) }
Last updated 2 years ago
Was this helpful?