Files
moxa/_test/sample.plugin
Sebastien Binet 476a31322d Go get ellipsis (#1)
* gi: rename gi_c into _gi_c

* gi: rename test into _test

* gi: fix README syntax
2018-06-26 10:17:01 +02:00

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()")
}