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