Skip to content

Instantly share code, notes, and snippets.

@azylman
Last active August 29, 2015 14:27
Show Gist options
  • Save azylman/305ad6172dd884aaaed4 to your computer and use it in GitHub Desktop.
Save azylman/305ad6172dd884aaaed4 to your computer and use it in GitHub Desktop.
package main
import (
"net/http"
"net/http/httptest"
"net/http/httputil"
"net/url"
)
func main() {
url, err := url.Parse("https://google.com")
if err != nil {
panic(err)
}
http.Print()
httptest.NewServer(httputil.NewSingleHostReverseProxy(url))
}
$ export GO15VENDOREXPERIMENT=1
$ go version
go version go1.5rc1 linux/amd64
$ ls
main.go vendor
$ ls vendor/net/http
http.go
$ go run *.go
testing
package http
func Print() {
println("testing")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment