github.com/HaHadaxigua/yaegi@v1.0.1/_test/struct37.go (about)

     1  package main
     2  
     3  import (
     4  	"net/http"
     5  	"strings"
     6  )
     7  
     8  type MyHttpClient struct {
     9  	*http.Client
    10  }
    11  
    12  func main() {
    13  	c := new(MyHttpClient)
    14  	c.Client = new(http.Client)
    15  	_, err := c.Get("url")
    16  	println(strings.Contains(err.Error(), "unsupported protocol scheme"))
    17  }
    18  
    19  // Output:
    20  // true