update test matrix
This commit is contained in:
parent
a02b1fe885
commit
512aa5c6e8
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user