Last active
August 29, 2015 14:27
-
-
Save azylman/305ad6172dd884aaaed4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package http | |
func Print() { | |
println("testing") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment