Skip to content

Commit

Permalink
add test packages
Browse files Browse the repository at this point in the history
These packages are not meant to be used; they exist only to test
the go command in various scenarios.
  • Loading branch information
dmitshur committed Mar 17, 2019
1 parent 5c8ae21 commit ce682e8
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions 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, `<meta name="go-import" content="dmitri.shuralyov.com/test/go-get-issue-unicode git https://github.com/dmitshur-test/go-get-issue-unicode">`)
}
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, `<meta name="go-import" content="dmitri.shuralyov.com/test/modtest1 mod https://dmitri.shuralyov.com/test/moduleproxy">`)
}
http.HandleFunc("/test/modtest1", h)
http.HandleFunc("/test/modtest1/inner", h)
http.HandleFunc("/test/modtest1/inner/p", h)
}
}

0 comments on commit ce682e8

Please sign in to comment.