Closed moorereason closed 8 years ago
I'm -1 on adding another flag. proxy's are already done via http_proxy
which the http package should just pick up automatically.
Can we get away with this and avoid adding another flag?
ie, doesn't http.ProxyFromEnv
give us this for free?
Again, I'm caught up trying to match curl's options. :smile: Reworked to use the env. I like it.
Not sure how to automate tests, but here's how I'm manually testing:
go get github.com/elazarl/goproxy
cd $GOPATH/src/github.com/elazarl/goproxy/examples/goproxy-basic
go run main.go -v
LGTM. Thanks.
Yeah, I did some manual testing against a local polipo(1) installed on a machine on my network. I'm happy that setting HTTPS_PROXY et al to the wrong value causes the connection to fail which means those values are being picked up from the env correctly.
I don't think we need too much testing here, we're reusing a well tested component from the net/http package.
Fixes #67