summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/reverseproxy
diff options
context:
space:
mode:
authorFrancis Lavoie <lavofr@gmail.com>2022-08-02 16:39:09 -0400
committerGitHub <noreply@github.com>2022-08-02 16:39:09 -0400
commit141872ed80d6323505e7543628c259fdae8506d3 (patch)
tree53581cddf2fcce189c3a55019194b64b0cd3af13 /modules/caddyhttp/reverseproxy
parentdb1aa5b5bc174e5a5df39a277f737b304e1e2350 (diff)
chore: Bump up to Go 1.19, minimum 1.18 (#4925)
Diffstat (limited to 'modules/caddyhttp/reverseproxy')
-rw-r--r--modules/caddyhttp/reverseproxy/admin.go2
-rw-r--r--modules/caddyhttp/reverseproxy/healthchecks.go2
-rw-r--r--modules/caddyhttp/reverseproxy/reverseproxy.go2
-rw-r--r--modules/caddyhttp/reverseproxy/streaming.go2
4 files changed, 4 insertions, 4 deletions
diff --git a/modules/caddyhttp/reverseproxy/admin.go b/modules/caddyhttp/reverseproxy/admin.go
index 771fa10..f64d1ec 100644
--- a/modules/caddyhttp/reverseproxy/admin.go
+++ b/modules/caddyhttp/reverseproxy/admin.go
@@ -76,7 +76,7 @@ func (adminUpstreams) handleUpstreams(w http.ResponseWriter, r *http.Request) er
// Iterate over the upstream pool (needs to be fast)
var rangeErr error
- hosts.Range(func(key, val interface{}) bool {
+ hosts.Range(func(key, val any) bool {
address, ok := key.(string)
if !ok {
rangeErr = caddy.APIError{
diff --git a/modules/caddyhttp/reverseproxy/healthchecks.go b/modules/caddyhttp/reverseproxy/healthchecks.go
index 317b283..eb98638 100644
--- a/modules/caddyhttp/reverseproxy/healthchecks.go
+++ b/modules/caddyhttp/reverseproxy/healthchecks.go
@@ -269,7 +269,7 @@ func (h *Handler) doActiveHealthCheck(dialInfo DialInfo, hostAddr string, upstre
// attach dialing information to this request
ctx := h.ctx.Context
ctx = context.WithValue(ctx, caddy.ReplacerCtxKey, caddy.NewReplacer())
- ctx = context.WithValue(ctx, caddyhttp.VarsCtxKey, map[string]interface{}{
+ ctx = context.WithValue(ctx, caddyhttp.VarsCtxKey, map[string]any{
dialInfoVarKey: dialInfo,
})
req, err := http.NewRequestWithContext(ctx, http.MethodGet, u.String(), nil)
diff --git a/modules/caddyhttp/reverseproxy/reverseproxy.go b/modules/caddyhttp/reverseproxy/reverseproxy.go
index 7061275..c800b39 100644
--- a/modules/caddyhttp/reverseproxy/reverseproxy.go
+++ b/modules/caddyhttp/reverseproxy/reverseproxy.go
@@ -1317,7 +1317,7 @@ func (brc bodyReadCloser) Close() error {
// bufPool is used for buffering requests and responses.
var bufPool = sync.Pool{
- New: func() interface{} {
+ New: func() any {
return new(bytes.Buffer)
},
}
diff --git a/modules/caddyhttp/reverseproxy/streaming.go b/modules/caddyhttp/reverseproxy/streaming.go
index 6bd1af2..298ab58 100644
--- a/modules/caddyhttp/reverseproxy/streaming.go
+++ b/modules/caddyhttp/reverseproxy/streaming.go
@@ -279,7 +279,7 @@ func (c switchProtocolCopier) copyToBackend(errc chan<- error) {
}
var streamingBufPool = sync.Pool{
- New: func() interface{} {
+ New: func() any {
// The Pool's New function should generally only return pointer
// types, since a pointer can be put into the return interface
// value without an allocation