github.com/traefik/yaegi@v0.15.1/_test/type20.go (about) 1 package main 2 3 import ( 4 "io" 5 "strings" 6 ) 7 8 func isCloser(r io.Reader) bool { 9 _, ok := r.(io.Closer) 10 return ok 11 } 12 13 func main() { 14 println(isCloser(strings.NewReader("test"))) 15 } 16 17 // Output: 18 // false