Go Series Part 5: Comma OK Syntax or Error OK Syntax
Introduction Have you ever come across a statement like this? func main() { i := "hello world" n, ok := i.(int) if ok { fmt.Println("n:", n) } else { fmt.Println("not an int") } } In Go, there's no try-catch block...
Jul 15, 20242 min read87
