package main
import "fmt"
type User struct {
id int
name string
}
func main() {
var o interface{} = &User{1, "Tom"}
if i, ok := o.(fmt.Stringer); ok {
fmt.Println(i)
}
u := o.(*User)
fmt.Println(u)
v, ok := o.(fmt.Stringer)
fmt.Println(v, ok)
}