github.com/gmemcc/yaegi@v0.12.1-0.20221128122509-aa99124c5d16/_test/struct15.go (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