diff options
author | Matthew Holt <mholt@users.noreply.github.com> | 2019-09-14 18:05:45 -0600 |
---|---|---|
committer | Matthew Holt <mholt@users.noreply.github.com> | 2019-09-14 18:05:45 -0600 |
commit | f15f0d5839479f8511621b88fa4bdcca3b89cc32 (patch) | |
tree | c42f522dcaed82c0dbab158c552e255050e1cb8a | |
parent | e73b117332a5606a986ee7e03e6f4b0cea7871c9 (diff) |
Eliminate some TODOs
-rw-r--r-- | caddy.go | 2 | ||||
-rw-r--r-- | modules/caddyhttp/encode/encode.go | 2 | ||||
-rw-r--r-- | modules/caddyhttp/matchers.go | 2 | ||||
-rw-r--r-- | modules/caddyhttp/reverseproxy/reverseproxy.go | 6 | ||||
-rw-r--r-- | modules/caddyhttp/routes.go | 4 | ||||
-rw-r--r-- | modules/caddytls/acmemanager.go | 4 | ||||
-rw-r--r-- | modules/caddytls/connpolicy.go | 4 | ||||
-rw-r--r-- | modules/caddytls/sessiontickets.go | 2 | ||||
-rw-r--r-- | modules/caddytls/tls.go | 4 |
9 files changed, 15 insertions, 15 deletions
@@ -93,7 +93,7 @@ func Run(newCfg *Config) error { return fmt.Errorf("creating storage value: %v", err) } newCfg.storage = stor - newCfg.StorageRaw = nil // allow GC to deallocate - TODO: Does this help? + newCfg.StorageRaw = nil // allow GC to deallocate } if newCfg.storage == nil { newCfg.storage = &certmagic.FileStorage{Path: dataDir()} 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 } diff --git a/modules/caddytls/acmemanager.go b/modules/caddytls/acmemanager.go index 0482ce3..f9a6409 100644 --- a/modules/caddytls/acmemanager.go +++ b/modules/caddytls/acmemanager.go @@ -74,7 +74,7 @@ func (m *ACMEManagerMaker) Provision(ctx caddy.Context) error { return fmt.Errorf("loading DNS provider module: %s", err) } m.Challenges.DNS = val.(challenge.Provider) - m.Challenges.DNSRaw = nil // allow GC to deallocate - TODO: Does this help? + m.Challenges.DNSRaw = nil // allow GC to deallocate } // policy-specific storage implementation @@ -88,7 +88,7 @@ func (m *ACMEManagerMaker) Provision(ctx caddy.Context) error { return fmt.Errorf("creating TLS storage configuration: %v", err) } m.storage = cmStorage - m.Storage = nil // allow GC to deallocate - TODO: Does this help? + m.Storage = nil // allow GC to deallocate } return nil diff --git a/modules/caddytls/connpolicy.go b/modules/caddytls/connpolicy.go index c952369..7d86308 100644 --- a/modules/caddytls/connpolicy.go +++ b/modules/caddytls/connpolicy.go @@ -46,7 +46,7 @@ func (cp ConnectionPolicies) TLSConfig(ctx caddy.Context) (*tls.Config, error) { } cp[i].matchers = append(cp[i].matchers, val.(ConnectionMatcher)) } - cp[i].Matchers = nil // allow GC to deallocate - TODO: Does this help? + cp[i].Matchers = nil // allow GC to deallocate // certificate selector if pol.CertSelection != nil { @@ -55,7 +55,7 @@ func (cp ConnectionPolicies) TLSConfig(ctx caddy.Context) (*tls.Config, error) { return nil, fmt.Errorf("loading certificate selection module: %s", err) } cp[i].certSelector = val.(certmagic.CertificateSelector) - cp[i].CertSelection = nil // allow GC to deallocate - TODO: Does this help? + cp[i].CertSelection = nil // allow GC to deallocate } } diff --git a/modules/caddytls/sessiontickets.go b/modules/caddytls/sessiontickets.go index 2eb0773..6ca921d 100644 --- a/modules/caddytls/sessiontickets.go +++ b/modules/caddytls/sessiontickets.go @@ -62,7 +62,7 @@ func (s *SessionTicketService) provision(ctx caddy.Context) error { return fmt.Errorf("loading TLS session ticket ephemeral keys provider module: %s", err) } s.keySource = val.(STEKProvider) - s.KeySource = nil // allow GC to deallocate - TODO: Does this help? + s.KeySource = nil // allow GC to deallocate // if session tickets or just rotation are // disabled, no need to start service diff --git a/modules/caddytls/tls.go b/modules/caddytls/tls.go index 99d3a5f..df4631c 100644 --- a/modules/caddytls/tls.go +++ b/modules/caddytls/tls.go @@ -71,7 +71,7 @@ func (t *TLS) Provision(ctx caddy.Context) error { return fmt.Errorf("loading TLS automation management module: %s", err) } t.Automation.Policies[i].Management = val.(ManagerMaker) - t.Automation.Policies[i].ManagementRaw = nil // allow GC to deallocate - TODO: Does this help? + t.Automation.Policies[i].ManagementRaw = nil // allow GC to deallocate } // certificate loaders @@ -138,7 +138,7 @@ func (t *TLS) Start() error { return fmt.Errorf("automate: managing %v: %v", names, err) } } - t.Certificates = nil // allow GC to deallocate - TODO: Does this help? + t.Certificates = nil // allow GC to deallocate return nil } |