diff options
author | Francis Lavoie <[email protected]> | 2024-03-03 03:45:10 -0500 |
---|---|---|
committer | Francis Lavoie <[email protected]> | 2024-04-17 11:57:29 -0400 |
commit | 244ef288a9fb81366c65976a14d2d5642e9ed24e (patch) | |
tree | 3e23044d6942ad0b2f88b89629dadd7e50d8e2b9 | |
parent | 299243cfecb9eb3901b8211deb2aed8d8ab2a164 (diff) | |
download | caddy-244ef288a9fb81366c65976a14d2d5642e9ed24e.tar.gz caddy-244ef288a9fb81366c65976a14d2d5642e9ed24e.zip |
Some lint cleanup that my VSCode complained about
-rw-r--r-- | caddyconfig/httpcaddyfile/serveroptions.go | 2 | ||||
-rw-r--r-- | caddyconfig/httpcaddyfile/tlsapp.go | 6 | ||||
-rw-r--r-- | modules/caddyhttp/routes.go | 2 |
3 files changed, 7 insertions, 3 deletions
diff --git a/caddyconfig/httpcaddyfile/serveroptions.go b/caddyconfig/httpcaddyfile/serveroptions.go index 62902b964..18f14996c 100644 --- a/caddyconfig/httpcaddyfile/serveroptions.go +++ b/caddyconfig/httpcaddyfile/serveroptions.go @@ -291,7 +291,7 @@ func unmarshalCaddyfileServerOptions(d *caddyfile.Dispenser) (any, error) { func applyServerOptions( servers map[string]*caddyhttp.Server, options map[string]any, - warnings *[]caddyconfig.Warning, + _ *[]caddyconfig.Warning, ) error { serverOpts, ok := options["servers"].([]serverOptions) if !ok { diff --git a/caddyconfig/httpcaddyfile/tlsapp.go b/caddyconfig/httpcaddyfile/tlsapp.go index 08da3a5c7..e5d1603ed 100644 --- a/caddyconfig/httpcaddyfile/tlsapp.go +++ b/caddyconfig/httpcaddyfile/tlsapp.go @@ -487,7 +487,11 @@ func fillInGlobalACMEDefaults(issuer certmagic.Issuer, options map[string]any) e // for any other automation policies. A nil policy (and no error) will be // returned if there are no default/global options. However, if always is // true, a non-nil value will always be returned (unless there is an error). -func newBaseAutomationPolicy(options map[string]any, warnings []caddyconfig.Warning, always bool) (*caddytls.AutomationPolicy, error) { +func newBaseAutomationPolicy( + options map[string]any, + _ []caddyconfig.Warning, + always bool, +) (*caddytls.AutomationPolicy, error) { issuers, hasIssuers := options["cert_issuer"] _, hasLocalCerts := options["local_certs"] keyType, hasKeyType := options["key_type"] diff --git a/modules/caddyhttp/routes.go b/modules/caddyhttp/routes.go index 9be3d01a4..9db4f2520 100644 --- a/modules/caddyhttp/routes.go +++ b/modules/caddyhttp/routes.go @@ -311,7 +311,7 @@ func wrapRoute(route Route) Middleware { // we need to pull this particular MiddlewareHandler // pointer into its own stack frame to preserve it so it // won't be overwritten in future loop iterations. -func wrapMiddleware(ctx caddy.Context, mh MiddlewareHandler, metrics *Metrics) Middleware { +func wrapMiddleware(_ caddy.Context, mh MiddlewareHandler, metrics *Metrics) Middleware { handlerToUse := mh if metrics != nil { // wrap the middleware with metrics instrumentation |