github.com/traefik/yaegi@v0.15.1/_test/named3/named3.go (about)

     1  package named3
     2  
     3  import (
     4  	"fmt"
     5  	"net/http"
     6  )
     7  
     8  type T struct {
     9  	A string
    10  }
    11  
    12  func (t *T) Print() {
    13  	println(t.A)
    14  }
    15  
    16  type A http.Header
    17  
    18  func (a A) ForeachKey() error {
    19  	for k, vals := range a {
    20  		for _, v := range vals {
    21  			fmt.Println(k, v)
    22  		}
    23  
    24  	}
    25  
    26  	return nil
    27  }
    28  
    29  func (a A) Set(k string, v []string) {
    30  	a[k] = v
    31  }