Skip to content

Commit

Permalink
Update deps, fix lint, fix mount example
Browse files Browse the repository at this point in the history
  • Loading branch information
vearutop committed Mar 1, 2024
1 parent 2ccfa52 commit 38cca4a
Show file tree
Hide file tree
Showing 39 changed files with 361 additions and 218 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ env:
GO111MODULE: "on"
CACHE_BENCHMARK: "off" # Enables benchmark result reuse between runs, may skew latency results.
RUN_BASE_BENCHMARK: "on" # Runs benchmark for PR base in case benchmark result is missing.
GO_VERSION: 1.21.x
GO_VERSION: 1.22.x
jobs:
bench:
runs-on: ubuntu-latest
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.21.x
go-version: 1.22.x
- uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v3.7.0
uses: golangci/golangci-lint-action@v4.0.0
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.54.1
version: v1.56.2

# Optional: working directory, useful for monorepos
# working-directory: somedir
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gorelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ concurrency:
cancel-in-progress: true

env:
GO_VERSION: 1.21.x
GO_VERSION: 1.22.x
jobs:
gorelease:
runs-on: ubuntu-latest
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ concurrency:
env:
GO111MODULE: "on"
RUN_BASE_COVERAGE: "on" # Runs test for PR base in case base test coverage is missing.
COV_GO_VERSION: 1.21.x # Version of Go to collect coverage
COV_GO_VERSION: 1.22.x # Version of Go to collect coverage
TARGET_DELTA_COV: 90 # Target coverage of changed lines, in percents
jobs:
test:
strategy:
matrix:
go-version: [ 1.13.x, 1.20.x, 1.21.x ]
go-version: [ 1.13.x, 1.21.x, 1.22.x ]
runs-on: ubuntu-latest
steps:
- name: Install Go stable
Expand Down Expand Up @@ -88,9 +88,9 @@ jobs:
id: annotate
if: matrix.go-version == env.COV_GO_VERSION && github.event.pull_request.base.sha != ''
run: |
curl -sLO https://github.com/vearutop/gocovdiff/releases/download/v1.4.0/linux_amd64.tar.gz && tar xf linux_amd64.tar.gz && rm linux_amd64.tar.gz
curl -sLO https://github.com/vearutop/gocovdiff/releases/download/v1.4.2/linux_amd64.tar.gz && tar xf linux_amd64.tar.gz && rm linux_amd64.tar.gz
gocovdiff_hash=$(git hash-object ./gocovdiff)
[ "$gocovdiff_hash" == "f191b45548bb65ec2c7d88909679a57116ff1ba1" ] || (echo "::error::unexpected hash for gocovdiff, possible tampering: $gocovdiff_hash" && exit 1)
[ "$gocovdiff_hash" == "c37862c73a677e5a9c069470287823ab5bbf0244" ] || (echo "::error::unexpected hash for gocovdiff, possible tampering: $gocovdiff_hash" && exit 1)
git fetch origin master ${{ github.event.pull_request.base.sha }}
REP=$(./gocovdiff -mod github.com/$GITHUB_REPOSITORY -cov unit.coverprofile -gha-annotations gha-unit.txt -delta-cov-file delta-cov-unit.txt -target-delta-cov ${TARGET_DELTA_COV})
echo "${REP}"
Expand Down
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,6 @@ issues:
- linters:
- errcheck # Error checking omitted for brevity.
- gosec
- revive
path: "example_"

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#GOLANGCI_LINT_VERSION := "v1.54.1" # Optional configuration to pinpoint golangci-lint version.
#GOLANGCI_LINT_VERSION := "v1.56.2" # Optional configuration to pinpoint golangci-lint version.

# The head of Makefile determines location of dev-go to include standard targets.
GO ?= go
Expand Down
8 changes: 4 additions & 4 deletions _examples/advanced-generic-openapi31/_testdata/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -915,17 +915,17 @@
"simple":{"description":"Simple scalar value in body.","type":"string"},
"uploads1":{
"description":"Uploads with *multipart.FileHeader.",
"items":{"$ref":"#/components/schemas/MultipartFileHeader"},"type":["array","null"]
"items":{"$ref":"#/components/schemas/MultipartFileHeader"},"type":"array"
},
"uploads2":{
"description":"Uploads with multipart.File.","items":{"$ref":"#/components/schemas/MultipartFile"},
"type":["array","null"]
"type":"array"
}
},
"type":"object"
},
"MultipartFile":{"format":"binary","type":["null","string"]},
"MultipartFileHeader":{"format":"binary","type":["null","string"]},
"MultipartFile":{"contentMediaType":"application/octet-stream","format":"binary","type":"string"},
"MultipartFileHeader":{"contentMediaType":"application/octet-stream","format":"binary","type":"string"},
"RestErrResponse":{
"properties":{
"code":{"description":"Application-specific error code.","type":"integer"},
Expand Down
7 changes: 3 additions & 4 deletions _examples/advanced/_testdata/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -728,17 +728,16 @@
"simple":{"type":"string","description":"Simple scalar value in body."},
"uploads1":{
"type":"array","items":{"$ref":"#/components/schemas/MultipartFileHeader"},
"description":"Uploads with *multipart.FileHeader.","nullable":true
"description":"Uploads with *multipart.FileHeader."
},
"uploads2":{
"type":"array","items":{"$ref":"#/components/schemas/MultipartFile"},
"description":"Uploads with multipart.File.","nullable":true
"description":"Uploads with multipart.File."
}
},
"additionalProperties":false
},
"MultipartFile":{"type":"string","format":"binary","nullable":true},
"MultipartFileHeader":{"type":"string","format":"binary","nullable":true},
"MultipartFile":{"type":"string","format":"binary"},"MultipartFileHeader":{"type":"string","format":"binary"},
"RestErrResponse":{
"type":"object",
"properties":{
Expand Down
38 changes: 19 additions & 19 deletions _examples/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,27 @@ replace github.com/swaggest/rest => ../

require (
github.com/bool64/ctxd v1.2.1
github.com/bool64/dev v0.2.32
github.com/bool64/dev v0.2.34
github.com/bool64/httpmock v0.1.13
github.com/bool64/httptestbench v0.1.4
github.com/gin-gonic/gin v1.9.1
github.com/go-chi/chi/v5 v5.0.10
github.com/go-chi/jwtauth/v5 v5.1.1
github.com/google/uuid v1.3.0
github.com/go-chi/chi/v5 v5.0.12
github.com/go-chi/jwtauth/v5 v5.3.0
github.com/google/uuid v1.6.0
github.com/kelseyhightower/envconfig v1.4.0
github.com/rs/cors v1.9.0
github.com/stretchr/testify v1.8.4
github.com/rs/cors v1.10.1
github.com/stretchr/testify v1.9.0
github.com/swaggest/assertjson v1.9.0
github.com/swaggest/jsonschema-go v0.3.64
github.com/swaggest/openapi-go v0.2.43
github.com/swaggest/jsonschema-go v0.3.66
github.com/swaggest/openapi-go v0.2.46
github.com/swaggest/rest v0.0.0-00010101000000-000000000000
github.com/swaggest/swgui v1.7.3
github.com/swaggest/usecase v1.3.0
github.com/valyala/fasthttp v1.48.0
github.com/swaggest/swgui v1.8.0
github.com/swaggest/usecase v1.3.1
github.com/valyala/fasthttp v1.52.0
)

require (
github.com/andybalholm/brotli v1.0.5 // indirect
github.com/andybalholm/brotli v1.1.0 // indirect
github.com/bool64/shared v0.1.5 // indirect
github.com/bytedance/sonic v1.9.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
Expand All @@ -42,14 +42,14 @@ require (
github.com/goccy/go-json v0.10.2 // indirect
github.com/iancoleman/orderedmap v0.3.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.16.7 // indirect
github.com/klauspost/compress v1.17.7 // indirect
github.com/klauspost/cpuid/v2 v2.2.4 // indirect
github.com/leodido/go-urn v1.2.4 // indirect
github.com/lestrrat-go/blackmagic v1.0.1 // indirect
github.com/lestrrat-go/blackmagic v1.0.2 // indirect
github.com/lestrrat-go/httpcc v1.0.1 // indirect
github.com/lestrrat-go/httprc v1.0.4 // indirect
github.com/lestrrat-go/iter v1.0.2 // indirect
github.com/lestrrat-go/jwx/v2 v2.0.11 // indirect
github.com/lestrrat-go/jwx/v2 v2.0.20 // indirect
github.com/lestrrat-go/option v1.0.1 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
Expand All @@ -70,10 +70,10 @@ require (
github.com/yudai/gojsondiff v1.0.0 // indirect
github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect
golang.org/x/arch v0.3.0 // indirect
golang.org/x/crypto v0.10.0 // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/sys v0.9.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/crypto v0.20.0 // indirect
golang.org/x/net v0.21.0 // indirect
golang.org/x/sys v0.17.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/protobuf v1.30.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
Loading

0 comments on commit 38cca4a

Please sign in to comment.