From 1ae6f8981a09602d80b9160da0720eb919d878e8 Mon Sep 17 00:00:00 2001 From: Frederic BIDON Date: Wed, 10 Sep 2025 22:27:05 +0200 Subject: [PATCH 1/2] chore: upgraded go-openapi to go 1.24 Signed-off-by: Frederic BIDON --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index f5da7cb..0f26e32 100644 --- a/go.mod +++ b/go.mod @@ -11,4 +11,4 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect ) -go 1.20 +go 1.24.0 From 9be95157d5a5708528a7bbedb2c7e5103dfaeb16 Mon Sep 17 00:00:00 2001 From: Frederic BIDON Date: Thu, 11 Sep 2025 08:25:20 +0200 Subject: [PATCH 2/2] fix go vet issue (go1.24+) Signed-off-by: Frederic BIDON --- api.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api.go b/api.go index d6f507f..52d4577 100644 --- a/api.go +++ b/api.go @@ -71,12 +71,12 @@ func NotFound(message string, args ...interface{}) Error { if message == "" { message = "Not found" } - return New(http.StatusNotFound, fmt.Sprintf(message, args...)) + return New(http.StatusNotFound, message, args...) } // NotImplemented creates a new not implemented error func NotImplemented(message string) Error { - return New(http.StatusNotImplemented, message) + return New(http.StatusNotImplemented, "%s", message) } // MethodNotAllowedError represents an error for when the path matches but the method doesn't @@ -179,7 +179,7 @@ func ServeError(rw http.ResponseWriter, r *http.Request, err error) { default: rw.WriteHeader(http.StatusInternalServerError) if r == nil || r.Method != http.MethodHead { - _, _ = rw.Write(errorAsJSON(New(http.StatusInternalServerError, err.Error()))) + _, _ = rw.Write(errorAsJSON(New(http.StatusInternalServerError, "%v", err))) } } }