diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4e74bbc..f6b5635 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -90,7 +90,7 @@ jobs: name: Go lint runs-on: ubuntu-latest env: - GOLANGCI_LINT_VERSION: v2.5.0 + GOLANGCI_LINT_VERSION: v2.7.2 GOPROXY: https://proxy.golang.org,https://u:${{ secrets.RIVERPRO_GO_MOD_CREDENTIAL }}@riverqueue.com/goproxy,direct permissions: contents: read diff --git a/handler.go b/handler.go index 5f83e8f..12bf994 100644 --- a/handler.go +++ b/handler.go @@ -313,9 +313,9 @@ func (h *Handler) Start(ctx context.Context) error { return nil } -func readManifest(frontendIndex fs.FS, devMode bool) (map[string]interface{}, error) { +func readManifest(frontendIndex fs.FS, devMode bool) (map[string]any, error) { if devMode { - return map[string]interface{}{}, nil + return map[string]any{}, nil } file, err := frontendIndex.Open(".vite/manifest.json") @@ -326,7 +326,7 @@ func readManifest(frontendIndex fs.FS, devMode bool) (map[string]interface{}, er if err != nil { return nil, errors.New("could not read .vite/manifest.json") } - var manifest map[string]interface{} + var manifest map[string]any err = json.Unmarshal(bytes, &manifest) if err != nil { return nil, errors.New("could not unmarshal .vite/manifest.json") diff --git a/handler_api_endpoint.go b/handler_api_endpoint.go index 58a109d..22cd326 100644 --- a/handler_api_endpoint.go +++ b/handler_api_endpoint.go @@ -794,7 +794,7 @@ func (a *queueUpdateEndpoint[TTx]) Execute(ctx context.Context, req *queueUpdate slices.Sort(req.Concurrency.Value.Partition.ByArgs) // Otherwise, construct metadata with the concurrency config - metadataStruct := map[string]interface{}{ + metadataStruct := map[string]any{ "concurrency": req.Concurrency.Value, } var err error diff --git a/spa_response_writer.go b/spa_response_writer.go index 28f7ca4..8a0cbdd 100644 --- a/spa_response_writer.go +++ b/spa_response_writer.go @@ -27,7 +27,7 @@ func intercept404(handler, on404 http.Handler) http.Handler { }) } -func serveIndexHTML(devMode bool, manifest map[string]interface{}, pathPrefix string, files http.FileSystem) http.HandlerFunc { +func serveIndexHTML(devMode bool, manifest map[string]any, pathPrefix string, files http.FileSystem) http.HandlerFunc { return func(rw http.ResponseWriter, req *http.Request) { // Restrict only to instances where the browser is looking for an HTML file if !strings.Contains(req.Header.Get("Accept"), "text/html") { @@ -51,7 +51,7 @@ func serveIndexHTML(devMode bool, manifest map[string]interface{}, pathPrefix st Base: pathPrefix, } - templateData := map[string]interface{}{ + templateData := map[string]any{ "Config": config, "Dev": devMode, "Manifest": manifest, @@ -71,7 +71,7 @@ func serveIndexHTML(devMode bool, manifest map[string]interface{}, pathPrefix st } tmpl, err := template.New("index.html").Funcs(template.FuncMap{ - "marshal": func(v interface{}) template.JS { + "marshal": func(v any) template.JS { a, _ := json.Marshal(v) return template.JS(a) //nolint:gosec },