AfterInit: init
This commit is contained in:
@@ -2,17 +2,18 @@ package main
|
||||
|
||||
import (
|
||||
"github.com/goplus/llgo/_demo/interf/foo"
|
||||
"github.com/goplus/llgo/c"
|
||||
)
|
||||
|
||||
func main() {
|
||||
if x, ok := foo.Bar().(struct{ V int }); ok {
|
||||
println(x.V)
|
||||
c.Printf(c.Str("%d\n"), x.V)
|
||||
} else {
|
||||
println("Bar: not ok")
|
||||
c.Printf(c.Str("Bar: not ok\n"))
|
||||
}
|
||||
if x, ok := foo.F().(struct{ v int }); ok {
|
||||
println(x.v)
|
||||
c.Printf(c.Str("%d\n"), x.v)
|
||||
} else {
|
||||
println("F: not ok")
|
||||
c.Printf(c.Str("F: not ok\n"))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user