diff --git a/.golangci.yml b/.golangci.yml index 1ad8eb38..dbd73576 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -28,7 +28,7 @@ linters-settings: enable-all: true disable: - shadow - + - fieldalignment gofumpt: extra-rules: true diff --git a/Makefile b/Makefile index e80d54b9..7678b4cf 100644 --- a/Makefile +++ b/Makefile @@ -28,8 +28,6 @@ dependencies-analyze: govulncheck ./... fmt: - which betteralign || go install github.com/dkorunic/betteralign/cmd/betteralign@latest - betteralign -fix -apply . which gofumpt || go install mvdan.cc/gofumpt@latest gofumpt -l -w -extra . diff --git a/server.go b/server.go index 4310f5fb..1f3775b8 100644 --- a/server.go +++ b/server.go @@ -32,10 +32,6 @@ var defaultOpenAPIServerConfig = OpenAPIServerConfig{ } type Server struct { - startTime time.Time - - fs fs.FS - // The underlying HTTP server *http.Server @@ -58,11 +54,15 @@ type Server struct { // Used to serialize the error response. Defaults to [SendError]. SerializeError ErrorSender + startTime time.Time + Security Security autoAuth AutoAuthConfig + fs fs.FS - basePath string // Base path of the group + // Base path of the group + basePath string loggingConfig LoggingConfig @@ -75,10 +75,8 @@ type Server struct { middlewares []func(http.Handler) http.Handler maxBodySize int64 - // If true, the server will return an error if the request body contains unknown fields. Useful for quick debugging in development. - DisallowUnknownFields bool - + DisallowUnknownFields bool disableStartupMessages bool disableAutoGroupTags bool isTLS bool