How to Check the Type of a Value in Go
A quick way to check the type of a value in Go is by using the %T
fmt verb in conjunction with
fmt.Printf()
. Here’s an example:
A quick way to check the type of a value in Go is by using the %T
fmt verb in conjunction with
fmt.Printf()
. Here’s an example: