summaryrefslogtreecommitdiff
path: root/modules/caddyhttp
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2019-09-14 18:05:45 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2019-09-14 18:05:45 -0600
commitf15f0d5839479f8511621b88fa4bdcca3b89cc32 (patch)
treec42f522dcaed82c0dbab158c552e255050e1cb8a /modules/caddyhttp
parente73b117332a5606a986ee7e03e6f4b0cea7871c9 (diff)
Eliminate some TODOs
Diffstat (limited to 'modules/caddyhttp')
-rw-r--r--modules/caddyhttp/encode/encode.go2
-rw-r--r--modules/caddyhttp/matchers.go2
-rw-r--r--modules/caddyhttp/reverseproxy/reverseproxy.go6
-rw-r--r--modules/caddyhttp/routes.go4
4 files changed, 7 insertions, 7 deletions
diff --git a/modules/caddyhttp/encode/encode.go b/modules/caddyhttp/encode/encode.go
index 1838885..3716fc6 100644
--- a/modules/caddyhttp/encode/encode.go
+++ b/modules/caddyhttp/encode/encode.go
@@ -68,7 +68,7 @@ func (enc *Encode) Provision(ctx caddy.Context) error {
return err
}
}
- enc.EncodingsRaw = nil // allow GC to deallocate - TODO: Does this help?
+ enc.EncodingsRaw = nil // allow GC to deallocate
if enc.MinLength == 0 {
enc.MinLength = defaultMinLength
diff --git a/modules/caddyhttp/matchers.go b/modules/caddyhttp/matchers.go
index 23047d0..94d051e 100644
--- a/modules/caddyhttp/matchers.go
+++ b/modules/caddyhttp/matchers.go
@@ -418,7 +418,7 @@ func (m *MatchNegate) Provision(ctx caddy.Context) error {
}
m.matchers = append(m.matchers, val.(RequestMatcher))
}
- m.matchersRaw = nil // allow GC to deallocate - TODO: Does this help?
+ m.matchersRaw = nil // allow GC to deallocate
return nil
}
diff --git a/modules/caddyhttp/reverseproxy/reverseproxy.go b/modules/caddyhttp/reverseproxy/reverseproxy.go
index 6a7ec70..485d14e 100644
--- a/modules/caddyhttp/reverseproxy/reverseproxy.go
+++ b/modules/caddyhttp/reverseproxy/reverseproxy.go
@@ -66,7 +66,7 @@ func (h *Handler) Provision(ctx caddy.Context) error {
return fmt.Errorf("loading transport module: %s", err)
}
h.Transport = val.(http.RoundTripper)
- h.TransportRaw = nil // allow GC to deallocate - TODO: Does this help?
+ h.TransportRaw = nil // allow GC to deallocate
}
if h.LoadBalancing != nil && h.LoadBalancing.SelectionPolicyRaw != nil {
val, err := ctx.LoadModuleInline("policy",
@@ -76,7 +76,7 @@ func (h *Handler) Provision(ctx caddy.Context) error {
return fmt.Errorf("loading load balancing selection module: %s", err)
}
h.LoadBalancing.SelectionPolicy = val.(Selector)
- h.LoadBalancing.SelectionPolicyRaw = nil // allow GC to deallocate - TODO: Does this help?
+ h.LoadBalancing.SelectionPolicyRaw = nil // allow GC to deallocate
}
if h.CBRaw != nil {
val, err := ctx.LoadModuleInline("type", "http.handlers.reverse_proxy.circuit_breakers", h.CBRaw)
@@ -84,7 +84,7 @@ func (h *Handler) Provision(ctx caddy.Context) error {
return fmt.Errorf("loading circuit breaker module: %s", err)
}
h.CB = val.(CircuitBreaker)
- h.CBRaw = nil // allow GC to deallocate - TODO: Does this help?
+ h.CBRaw = nil // allow GC to deallocate
}
if h.Transport == nil {
diff --git a/modules/caddyhttp/routes.go b/modules/caddyhttp/routes.go
index 1efbad6..108bb15 100644
--- a/modules/caddyhttp/routes.go
+++ b/modules/caddyhttp/routes.go
@@ -91,7 +91,7 @@ func (routes RouteList) Provision(ctx caddy.Context) error {
}
routes[i].MatcherSets = append(routes[i].MatcherSets, matchers)
}
- routes[i].MatcherSetsRaw = nil // allow GC to deallocate - TODO: Does this help?
+ routes[i].MatcherSetsRaw = nil // allow GC to deallocate
// handlers
for j, rawMsg := range route.HandlersRaw {
@@ -101,7 +101,7 @@ func (routes RouteList) Provision(ctx caddy.Context) error {
}
routes[i].Handlers = append(routes[i].Handlers, mh.(MiddlewareHandler))
}
- routes[i].HandlersRaw = nil // allow GC to deallocate - TODO: Does this help?
+ routes[i].HandlersRaw = nil // allow GC to deallocate
}
return nil
}