diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a1143c9..c51bddc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: - name: Set up latest Go 1.x version uses: actions/setup-go@v2 with: - go-version: '1.17' + go-version: '1.21' - name: Get dependencies run: | go mod tidy @@ -36,7 +36,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - go-version: ['1.13', '1.14', '1.15', '1.16', '1.17'] + go-version: ['1.13', '1.14', '1.15', '1.16', '1.17', '1.18', '1.19', '1.20', '1.21'] steps: - name: Set up Go ${{ matrix.go-version }} uses: actions/setup-go@v2 diff --git a/examples/webhooks/main.go b/examples/webhooks/main.go index fdee9b6..ec4a40a 100644 --- a/examples/webhooks/main.go +++ b/examples/webhooks/main.go @@ -85,12 +85,12 @@ func HandleTemplateDelete(rw http.ResponseWriter, tpl v1.TemplateDeleteWebhookDa serveJSON(rw, http.StatusOK, H{}) } -func readJSON(req *http.Request, out any) error { +func readJSON(req *http.Request, out interface{}) error { defer func() { _ = req.Body.Close() }() return json.NewDecoder(req.Body).Decode(out) } -func serveJSON(rw http.ResponseWriter, st int, data any) { +func serveJSON(rw http.ResponseWriter, st int, data interface{}) { resp, _ := json.Marshal(data) rw.Header().Set("Content-Type", "application/json; charset=utf-8") rw.WriteHeader(st)