```
package main
import (
"fmt"
)
type abc interface {
up() bool
down() bool
}
type myint uint32
func (m myint) up() bool {
return true
}
func (m myint) down() bool {
return false
}
func main() {
var nn myint
if ss, ok := nn.(abc); ok {
fmt.Println("ok")
}
}
```
老是提示
.\main.go:25: invalid type assertion: nn.(abc) (non-interface type myint on left)
哪位给看看?多谢
有疑问加站长微信联系(非本文作者)