2025/05/01
That wrapper types preserve type information in switch statements:
package main
import "fmt"
func main() {
type x string
y := x("asdf")
z := any(y)
switch z.(type) {
case x:
fmt.Println("cool")
case string:
fmt.Println("uh")
}
}