From fe58e7832ffb2b17f6bfe08b0a0fc1905d9e6d8a Mon Sep 17 00:00:00 2001 From: Viacheslav Poturaev Date: Wed, 12 Apr 2023 23:09:39 +0200 Subject: [PATCH] Update deps and CI (#151) --- .github/workflows/bench.yml | 10 +++++----- .github/workflows/cloc.yml | 4 ++-- .github/workflows/gorelease.yml | 6 +++--- .github/workflows/test-unit.yml | 8 ++++---- _examples/basic/main.go | 2 +- _examples/generic/main.go | 2 +- _examples/go.mod | 4 ++-- _examples/go.sum | 7 ++++--- go.mod | 4 ++-- go.sum | 6 ++++-- 10 files changed, 28 insertions(+), 25 deletions(-) diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index dbcbf6d..bd4fb36 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -28,7 +28,7 @@ jobs: steps: - name: Install Go stable if: env.GO_VERSION != 'tip' - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: go-version: ${{ env.GO_VERSION }} @@ -43,12 +43,12 @@ jobs: echo "PATH=$HOME/go/bin:$HOME/sdk/gotip/bin/:$PATH" >> $GITHUB_ENV - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: ref: ${{ (github.event.inputs.new != '') && github.event.inputs.new || github.event.ref }} - name: Go cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: # In order: # * Module download cache @@ -61,7 +61,7 @@ jobs: ${{ runner.os }}-go-cache - name: Restore benchstat - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/go/bin/benchstat key: ${{ runner.os }}-benchstat-legacy @@ -69,7 +69,7 @@ jobs: - name: Restore base benchmark result id: base-benchmark if: env.CACHE_BENCHMARK == 'on' - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | bench-master.txt diff --git a/.github/workflows/cloc.yml b/.github/workflows/cloc.yml index 927e099..3f1fc19 100644 --- a/.github/workflows/cloc.yml +++ b/.github/workflows/cloc.yml @@ -13,11 +13,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: path: pr - name: Checkout base code - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.base.sha }} path: base diff --git a/.github/workflows/gorelease.yml b/.github/workflows/gorelease.yml index 5fb995e..41767ba 100644 --- a/.github/workflows/gorelease.yml +++ b/.github/workflows/gorelease.yml @@ -16,7 +16,7 @@ jobs: steps: - name: Install Go stable if: env.GO_VERSION != 'tip' - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: go-version: ${{ env.GO_VERSION }} - name: Install Go tip @@ -29,9 +29,9 @@ jobs: ~/sdk/gotip/bin/go version echo "PATH=$HOME/go/bin:$HOME/sdk/gotip/bin/:$PATH" >> $GITHUB_ENV - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Gorelease cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | ~/go/bin/gorelease diff --git a/.github/workflows/test-unit.yml b/.github/workflows/test-unit.yml index 4835bf0..2817dcc 100644 --- a/.github/workflows/test-unit.yml +++ b/.github/workflows/test-unit.yml @@ -21,12 +21,12 @@ jobs: test: strategy: matrix: - go-version: [ 1.13.x, 1.19.x, 1.20.x ] + go-version: [ 1.13.x, 1.19.x, 1.20.x ] runs-on: ubuntu-latest steps: - name: Install Go stable if: matrix.go-version != 'tip' - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: go-version: ${{ matrix.go-version }} @@ -41,10 +41,10 @@ jobs: echo "PATH=$HOME/go/bin:$HOME/sdk/gotip/bin/:$PATH" >> $GITHUB_ENV - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Go cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: # In order: # * Module download cache diff --git a/_examples/basic/main.go b/_examples/basic/main.go index 95683ba..368d25f 100644 --- a/_examples/basic/main.go +++ b/_examples/basic/main.go @@ -77,7 +77,7 @@ func main() { // Start server. log.Println("http://localhost:8011/docs") - if err := http.ListenAndServe(":8011", s); err != nil { + if err := http.ListenAndServe("localhost:8011", s); err != nil { log.Fatal(err) } } diff --git a/_examples/generic/main.go b/_examples/generic/main.go index e7c0b56..15f8165 100644 --- a/_examples/generic/main.go +++ b/_examples/generic/main.go @@ -82,7 +82,7 @@ func main() { // Start server. log.Println("http://localhost:8011/docs") - if err := http.ListenAndServe(":8011", s); err != nil { + if err := http.ListenAndServe("localhost:8011", s); err != nil { log.Fatal(err) } } diff --git a/_examples/go.mod b/_examples/go.mod index 772decd..96f3f6c 100644 --- a/_examples/go.mod +++ b/_examples/go.mod @@ -6,7 +6,7 @@ replace github.com/swaggest/rest => ../ require ( github.com/bool64/ctxd v1.2.1 - github.com/bool64/dev v0.2.25 + github.com/bool64/dev v0.2.27 github.com/bool64/httpmock v0.1.8 github.com/bool64/httptestbench v0.1.4 github.com/go-chi/chi/v5 v5.0.8 @@ -14,7 +14,7 @@ require ( github.com/rs/cors v1.8.3 github.com/stretchr/testify v1.8.2 github.com/swaggest/assertjson v1.7.0 - github.com/swaggest/jsonschema-go v0.3.48 + github.com/swaggest/jsonschema-go v0.3.49 github.com/swaggest/openapi-go v0.2.29 github.com/swaggest/swgui v1.6.0 github.com/swaggest/usecase v1.2.1 diff --git a/_examples/go.sum b/_examples/go.sum index a366d1e..4112dab 100644 --- a/_examples/go.sum +++ b/_examples/go.sum @@ -5,8 +5,9 @@ github.com/bool64/ctxd v1.2.1 h1:hARFteq0zdn4bwfmxLhak3fXFuvtJVKDH2X29VV/2ls= github.com/bool64/ctxd v1.2.1/go.mod h1:ZG6QkeGVLTiUl2mxPpyHmFhDzFZCyocr9hluBV3LYuc= github.com/bool64/dev v0.1.41/go.mod h1:cTHiTDNc8EewrQPy3p1obNilpMpdmlUesDkFTF2zRWU= github.com/bool64/dev v0.2.5/go.mod h1:cTHiTDNc8EewrQPy3p1obNilpMpdmlUesDkFTF2zRWU= -github.com/bool64/dev v0.2.25 h1:p6euAfe1zLXb1qzLssm0lJnM5KhfUZp/Qjb2dsPkIKU= github.com/bool64/dev v0.2.25/go.mod h1:iJbh1y/HkunEPhgebWRNcs8wfGq7sjvJ6W5iabL8ACg= +github.com/bool64/dev v0.2.27 h1:mFT+B74mFVgUeUmm/EbfM6ELPA55lEXBjQ/AOHCwCOc= +github.com/bool64/dev v0.2.27/go.mod h1:iJbh1y/HkunEPhgebWRNcs8wfGq7sjvJ6W5iabL8ACg= github.com/bool64/httpmock v0.1.8 h1:plNJylRdMGjNDV8kCuapKTJJS8p6zbvWbR8NG+Z6qAA= github.com/bool64/httpmock v0.1.8/go.mod h1:3T4cLULWI5qlTx+tSF6YaiAWq4IZ1aP//klpumgPj1s= github.com/bool64/httptestbench v0.1.4 h1:35f9RwWqcnQRXM+sA+GUhWVGSa6XEFlKpNSH9oYzOjI= @@ -61,8 +62,8 @@ github.com/swaggest/assertjson v1.7.0 h1:SKw5Rn0LQs6UvmGrIdaKQbMR1R3ncXm5KNon+QJ github.com/swaggest/assertjson v1.7.0/go.mod h1:vxMJMehbSVJd+dDWFCKv3QRZKNTpy/ktZKTz9LOEDng= github.com/swaggest/form/v5 v5.0.4 h1:hTg+gjUEZG0vgsDdXOPi7I0Xu5OowXKoLZIGYZsoddg= github.com/swaggest/form/v5 v5.0.4/go.mod h1:X1hraaoONee20PMnGNLQpO32f9zbQ0Czfm7iZThuEKg= -github.com/swaggest/jsonschema-go v0.3.48 h1:zscQIIh2DlUaPTgCntPOq9s9a5QQTeWcs2QTE6P7nEY= -github.com/swaggest/jsonschema-go v0.3.48/go.mod h1:67EkOWKuBlpuvfZW1djhCD4ZSGNdXUjrTEWe16S5uEg= +github.com/swaggest/jsonschema-go v0.3.49 h1:0dB6+6/uuU9lH41evLVum9Ui1b1Pkm1mjtsHWYL+y30= +github.com/swaggest/jsonschema-go v0.3.49/go.mod h1:fZmC8juuqFTMe4Fc9tHJXwG+Uaf9BKYvF8ygL+asOuY= github.com/swaggest/openapi-go v0.2.29 h1:irfkrid6DPGxncZUdGmDrXbSLqat1QOGwvd5M1OFFbY= github.com/swaggest/openapi-go v0.2.29/go.mod h1:htXGkuB1r1g425f+SxjAq2yHwu9g9MlHT+TuZRcLMCo= github.com/swaggest/refl v1.1.0 h1:a+9a75Kv6ciMozPjVbOfcVTEQe81t2R3emvaD9oGQGc= diff --git a/go.mod b/go.mod index 3a95371..ab4f301 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/swaggest/rest go 1.17 require ( - github.com/bool64/dev v0.2.25 + github.com/bool64/dev v0.2.27 github.com/bool64/httpmock v0.1.8 github.com/bool64/shared v0.1.5 github.com/cespare/xxhash/v2 v2.2.0 @@ -12,7 +12,7 @@ require ( github.com/stretchr/testify v1.8.2 github.com/swaggest/assertjson v1.7.0 github.com/swaggest/form/v5 v5.0.4 - github.com/swaggest/jsonschema-go v0.3.48 + github.com/swaggest/jsonschema-go v0.3.49 github.com/swaggest/openapi-go v0.2.29 github.com/swaggest/refl v1.1.0 github.com/swaggest/usecase v1.2.1 diff --git a/go.sum b/go.sum index fdf0acd..addd708 100644 --- a/go.sum +++ b/go.sum @@ -4,8 +4,9 @@ github.com/bool64/dev v0.2.16/go.mod h1:/csLrm+4oDSsKJRIVS0mrywAonLnYKFG8RvGT7Jh github.com/bool64/dev v0.2.17/go.mod h1:iJbh1y/HkunEPhgebWRNcs8wfGq7sjvJ6W5iabL8ACg= github.com/bool64/dev v0.2.22/go.mod h1:iJbh1y/HkunEPhgebWRNcs8wfGq7sjvJ6W5iabL8ACg= github.com/bool64/dev v0.2.24/go.mod h1:iJbh1y/HkunEPhgebWRNcs8wfGq7sjvJ6W5iabL8ACg= -github.com/bool64/dev v0.2.25 h1:p6euAfe1zLXb1qzLssm0lJnM5KhfUZp/Qjb2dsPkIKU= github.com/bool64/dev v0.2.25/go.mod h1:iJbh1y/HkunEPhgebWRNcs8wfGq7sjvJ6W5iabL8ACg= +github.com/bool64/dev v0.2.27 h1:mFT+B74mFVgUeUmm/EbfM6ELPA55lEXBjQ/AOHCwCOc= +github.com/bool64/dev v0.2.27/go.mod h1:iJbh1y/HkunEPhgebWRNcs8wfGq7sjvJ6W5iabL8ACg= github.com/bool64/httpmock v0.1.8 h1:plNJylRdMGjNDV8kCuapKTJJS8p6zbvWbR8NG+Z6qAA= github.com/bool64/httpmock v0.1.8/go.mod h1:3T4cLULWI5qlTx+tSF6YaiAWq4IZ1aP//klpumgPj1s= github.com/bool64/shared v0.1.4/go.mod h1:ryGjsnQFh6BnEXClfVlEJrzjwzat7CmA8PNS5E+jPp0= @@ -76,8 +77,9 @@ github.com/swaggest/assertjson v1.7.0 h1:SKw5Rn0LQs6UvmGrIdaKQbMR1R3ncXm5KNon+QJ github.com/swaggest/assertjson v1.7.0/go.mod h1:vxMJMehbSVJd+dDWFCKv3QRZKNTpy/ktZKTz9LOEDng= github.com/swaggest/form/v5 v5.0.4 h1:hTg+gjUEZG0vgsDdXOPi7I0Xu5OowXKoLZIGYZsoddg= github.com/swaggest/form/v5 v5.0.4/go.mod h1:X1hraaoONee20PMnGNLQpO32f9zbQ0Czfm7iZThuEKg= -github.com/swaggest/jsonschema-go v0.3.48 h1:zscQIIh2DlUaPTgCntPOq9s9a5QQTeWcs2QTE6P7nEY= github.com/swaggest/jsonschema-go v0.3.48/go.mod h1:67EkOWKuBlpuvfZW1djhCD4ZSGNdXUjrTEWe16S5uEg= +github.com/swaggest/jsonschema-go v0.3.49 h1:0dB6+6/uuU9lH41evLVum9Ui1b1Pkm1mjtsHWYL+y30= +github.com/swaggest/jsonschema-go v0.3.49/go.mod h1:fZmC8juuqFTMe4Fc9tHJXwG+Uaf9BKYvF8ygL+asOuY= github.com/swaggest/openapi-go v0.2.29 h1:irfkrid6DPGxncZUdGmDrXbSLqat1QOGwvd5M1OFFbY= github.com/swaggest/openapi-go v0.2.29/go.mod h1:htXGkuB1r1g425f+SxjAq2yHwu9g9MlHT+TuZRcLMCo= github.com/swaggest/refl v1.1.0 h1:a+9a75Kv6ciMozPjVbOfcVTEQe81t2R3emvaD9oGQGc=