aboutsummaryrefslogtreecommitdiff
path: root/fasthttpproxy
diff options
context:
space:
mode:
authorGravatar Erik Dubbelboer <erik@dubbelboer.com> 2021-06-18 13:36:54 +0200
committerGravatar GitHub <noreply@github.com> 2021-06-18 13:36:54 +0200
commit87fc95849cd9ec7ffb3555bd7ec6317865902241 (patch)
tree7da68d05a3da0ef5c9fabcd3bd0da39edb1df9b6 /fasthttpproxy
parentDefined Transport for the client (#1045) (diff)
downloadfasthttp-87fc95849cd9ec7ffb3555bd7ec6317865902241.tar.gz
fasthttp-87fc95849cd9ec7ffb3555bd7ec6317865902241.tar.bz2
fasthttp-87fc95849cd9ec7ffb3555bd7ec6317865902241.zip
Run go test on github actions (#1047)
* Run go test on github actions travis-ci.org has stopped. See also: https://github.com/curl/curl/issues/7150 Downside: github actions don't support ppc64le * Run less * delete .travis.yml * Remove travis + minor lint fixes
Diffstat (limited to 'fasthttpproxy')
-rw-r--r--fasthttpproxy/http.go2
-rw-r--r--fasthttpproxy/proxy_env.go13
2 files changed, 7 insertions, 8 deletions
diff --git a/fasthttpproxy/http.go b/fasthttpproxy/http.go
index 0ba3092..6bc9c1e 100644
--- a/fasthttpproxy/http.go
+++ b/fasthttpproxy/http.go
@@ -22,7 +22,7 @@ func FasthttpHTTPDialer(proxy string) fasthttp.DialFunc {
return FasthttpHTTPDialerTimeout(proxy, 0)
}
-// FasthttpHTTPDialer returns a fasthttp.DialFunc that dials using
+// FasthttpHTTPDialerTimeout returns a fasthttp.DialFunc that dials using
// the provided HTTP proxy using the given timeout.
//
// Example usage:
diff --git a/fasthttpproxy/proxy_env.go b/fasthttpproxy/proxy_env.go
index 22cc76e..2457ad5 100644
--- a/fasthttpproxy/proxy_env.go
+++ b/fasthttpproxy/proxy_env.go
@@ -14,6 +14,12 @@ import (
"github.com/valyala/fasthttp"
)
+const (
+ httpsScheme = "https"
+ httpScheme = "http"
+ tlsPort = "443"
+)
+
// FasthttpProxyHTTPDialer returns a fasthttp.DialFunc that dials using
// the the env(HTTP_PROXY, HTTPS_PROXY and NO_PROXY) configured HTTP proxy.
//
@@ -32,13 +38,6 @@ func FasthttpProxyHTTPDialer() fasthttp.DialFunc {
// c := &fasthttp.Client{
// Dial: FasthttpProxyHTTPDialerTimeout(time.Second * 2),
// }
-
-const (
- httpsScheme = "https"
- httpScheme = "http"
- tlsPort = "443"
-)
-
func FasthttpProxyHTTPDialerTimeout(timeout time.Duration) fasthttp.DialFunc {
proxier := httpproxy.FromEnvironment().ProxyFunc()