github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/gnovm/tests/files/type20.gno (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