github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/gnovm/tests/backup/struct15.gno (about) 1 package main 2 3 import ( 4 "fmt" 5 "net/http" 6 ) 7 8 type GzipResponseWriter struct { 9 http.ResponseWriter 10 index int 11 } 12 13 type GzipResponseWriterWithCloseNotify struct { 14 *GzipResponseWriter 15 } 16 17 func (w GzipResponseWriterWithCloseNotify) CloseNotify() <-chan bool { 18 return w.ResponseWriter.(http.CloseNotifier).CloseNotify() 19 } 20 21 func main() { 22 fmt.Println("hello") 23 } 24 25 // Output: 26 // hello