@marcel91200 / caddy Mirror · read-only / commits / 1619352f
Fork 0

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

Mirrored from https://github.com/Slazee/caddy.git

Synced Nov 11, 02:15 UTC

ci: fix exhaustive linting (#8238)

Zen Dodd committed Oct 17, 2026 at 19:49 UTC 1619352f4e36d2c7dfab6d9e793f8495d7b36993
4 files changed +6 -2
.golangci.yml
-2
@@ -62,8 +62,6 @@ linters:
62 - fmt.*
63 - (go.uber.org/zap/zapcore.ObjectEncoder).AddObject
64 - (go.uber.org/zap/zapcore.ObjectEncoder).AddArray
65 - exhaustive:
66 - ignore-enum-types: reflect.Kind|svc.Cmd
65 exclusions:
66 generated: lax
67 presets:
context.go
+2
@@ -207,6 +207,8 @@ func (ctx Context) LoadModule(structPointer any, fieldName string) (any, error)
207
208 var result any
209
210 + // Unsupported field kinds return an error.
211 + //exhaustive:ignore
212 switch val.Kind() {
213 case reflect.Slice:
214 if isJSONRawMessage(typ) {
modules/caddyhttp/responsewriter.go
+2
@@ -98,6 +98,8 @@ func UnwrapResponseWriterAs[T any](w http.ResponseWriter) (T, bool) {
98
99 func responseWriterPointer(w http.ResponseWriter) uintptr {
100 v := reflect.ValueOf(w)
101 + // Only pointer-like kinds have stable identity.
102 + //exhaustive:ignore
103 switch v.Kind() {
104 case reflect.Pointer, reflect.Map, reflect.Chan, reflect.Func, reflect.Slice, reflect.UnsafePointer:
105 if v.IsNil() {
service_windows.go
+2
@@ -49,6 +49,8 @@ func (runner) Execute(args []string, request <-chan svc.ChangeRequest, status ch
49
50 for {
51 req := <-request
52 + // Unsupported service controls are ignored.
53 + //exhaustive:ignore
54 switch req.Cmd {
55 case svc.Interrogate:
56 status <- req.CurrentStatus