From 11dbc1c0b3b3e70e975a169dbafa57858b96ff4d Mon Sep 17 00:00:00 2001 From: Antoine Pourchet Date: Sun, 25 May 2025 17:10:40 -0600 Subject: [PATCH 1/3] Upgraded to Go 1.24.3 --- go.mod | 2 +- standard.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 420481a..87ea0d5 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/apourchet/httpwrap -go 1.22 +go 1.24.3 require ( github.com/gorilla/mux v1.7.2 diff --git a/standard.go b/standard.go index 196dcea..91d7852 100644 --- a/standard.go +++ b/standard.go @@ -66,7 +66,9 @@ func StandardResponseWriter() ResponseWriter { } w.WriteHeader(http.StatusOK) + w.Header().Set("Content-Type", "application/json") encoder := json.NewEncoder(w) + encoder.SetEscapeHTML(false) if sendError := encoder.Encode(res); sendError != nil { log.Println("Error writing response:", sendError) } From a6778de077df2b89c2e152aabcc424cc8a6c0488 Mon Sep 17 00:00:00 2001 From: Antoine Pourchet Date: Sun, 25 May 2025 17:12:43 -0600 Subject: [PATCH 2/3] fix github ci --- .github/workflows/examples.yml | 4 ++-- .github/workflows/unit-tests.yml | 2 +- go.mod | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index 0c0a1eb..c18c768 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - go-version: [ '1.20' ] + go-version: [ '1.20', '1.24' ] steps: - uses: actions/checkout@v4 @@ -23,4 +23,4 @@ jobs: - name: Compile example code run: go build -o /tmp/executable.exe ./examples/simple - name: Compile example code - run: go build -o /tmp/executable.exe ./examples/standard \ No newline at end of file + run: go build -o /tmp/executable.exe ./examples/standard diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index f995cdc..21b1cec 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - go-version: [ '1.20' ] + go-version: [ '1.20', '1.24' ] steps: - uses: actions/checkout@v4 diff --git a/go.mod b/go.mod index 87ea0d5..755bc15 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/apourchet/httpwrap -go 1.24.3 +go 1.24 require ( github.com/gorilla/mux v1.7.2 From 8a7542524a1a39868586cf04714611427c37ae92 Mon Sep 17 00:00:00 2001 From: Antoine Pourchet Date: Sun, 25 May 2025 17:14:37 -0600 Subject: [PATCH 3/3] fix github ci --- .github/workflows/examples.yml | 2 +- .github/workflows/unit-tests.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index c18c768..26a5b39 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - go-version: [ '1.20', '1.24' ] + go-version: [ '1.24' ] steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 21b1cec..fcb2e90 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - go-version: [ '1.20', '1.24' ] + go-version: [ '1.24' ] steps: - uses: actions/checkout@v4