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
|
- name: Set up latest Go 1.x version
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: '1.17'
|
go-version: '1.21'
|
||||||
- name: Get dependencies
|
- name: Get dependencies
|
||||||
run: |
|
run: |
|
||||||
go mod tidy
|
go mod tidy
|
||||||
@ -36,7 +36,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
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:
|
steps:
|
||||||
- name: Set up Go ${{ matrix.go-version }}
|
- name: Set up Go ${{ matrix.go-version }}
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
|
@ -85,12 +85,12 @@ func HandleTemplateDelete(rw http.ResponseWriter, tpl v1.TemplateDeleteWebhookDa
|
|||||||
serveJSON(rw, http.StatusOK, H{})
|
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() }()
|
defer func() { _ = req.Body.Close() }()
|
||||||
return json.NewDecoder(req.Body).Decode(out)
|
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)
|
resp, _ := json.Marshal(data)
|
||||||
rw.Header().Set("Content-Type", "application/json; charset=utf-8")
|
rw.Header().Set("Content-Type", "application/json; charset=utf-8")
|
||||||
rw.WriteHeader(st)
|
rw.WriteHeader(st)
|
||||||
|
Loading…
Reference in New Issue
Block a user