mirror of
https://github.com/traefik/yaegi.git
synced 2026-06-01 18:37:56 +00:00
* gi: rename gi_c into _gi_c * gi: rename test into _test * gi: fix README syntax
20 lines
304 B
Plaintext
20 lines
304 B
Plaintext
package sample
|
|
|
|
import (
|
|
"fmt"
|
|
"net/http"
|
|
)
|
|
|
|
type Sample struct{}
|
|
|
|
func (s *Sample) ServeHTTP(w http.ResponseWriter, r *http.Request, next http.HandlerFunc) {
|
|
r.Header.Set("X-sample-test", "Hello")
|
|
if next != nil {
|
|
next(w, r)
|
|
}
|
|
}
|
|
|
|
func Test() {
|
|
fmt.Println("Hello from toto.Test()")
|
|
}
|