From ce682e8d1b0aa766e76a62ecc01eeb46e6dd4cc1 Mon Sep 17 00:00:00 2001 From: Dmitri Shuralyov Date: Sat, 2 Feb 2019 12:54:38 -0500 Subject: [PATCH] add test packages These packages are not meant to be used; they exist only to test the go command in various scenarios. --- test.go | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 test.go diff --git a/test.go b/test.go new file mode 100644 index 0000000..3826035 --- /dev/null +++ b/test.go @@ -0,0 +1,29 @@ +package main + +import ( + "io" + "net/http" +) + +func init() { + // For golang.org/issue/18660. + { + h := func(w http.ResponseWriter, req *http.Request) { + w.Header().Set("Content-Type", "text/plain; charset=utf-8") + io.WriteString(w, ``) + } + http.HandleFunc("/test/go-get-issue-unicode", h) + http.HandleFunc("/test/go-get-issue-unicode/испытание", h) + } + + // For own module learning. + { + h := func(w http.ResponseWriter, req *http.Request) { + w.Header().Set("Content-Type", "text/plain; charset=utf-8") + io.WriteString(w, ``) + } + http.HandleFunc("/test/modtest1", h) + http.HandleFunc("/test/modtest1/inner", h) + http.HandleFunc("/test/modtest1/inner/p", h) + } +}