mirror of
https://github.com/gin-gonic/gin.git
synced 2026-06-06 12:08:20 +08:00
Compare commits
3 Commits
34de06f56c
...
1768611fc2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1768611fc2 | ||
|
|
5f4f964325 | ||
|
|
b7132ed5ec |
2
.github/workflows/gin.yml
vendored
2
.github/workflows/gin.yml
vendored
@ -78,6 +78,6 @@ jobs:
|
||||
run: make test
|
||||
|
||||
- name: Upload coverage to Codecov
|
||||
uses: codecov/codecov-action@v5
|
||||
uses: codecov/codecov-action@v6
|
||||
with:
|
||||
flags: ${{ matrix.os }},go-${{ matrix.go }},${{ matrix.test-tags }}
|
||||
|
||||
4
.github/workflows/trivy-scan.yml
vendored
4
.github/workflows/trivy-scan.yml
vendored
@ -27,7 +27,7 @@ jobs:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Run Trivy vulnerability scanner (source code)
|
||||
uses: aquasecurity/trivy-action@0.35.0
|
||||
uses: aquasecurity/trivy-action@v0.36.0
|
||||
with:
|
||||
scan-type: "fs"
|
||||
scan-ref: "."
|
||||
@ -44,7 +44,7 @@ jobs:
|
||||
sarif_file: "trivy-results.sarif"
|
||||
|
||||
- name: Run Trivy scanner (table output for logs)
|
||||
uses: aquasecurity/trivy-action@0.35.0
|
||||
uses: aquasecurity/trivy-action@v0.36.0
|
||||
if: always()
|
||||
with:
|
||||
scan-type: "fs"
|
||||
|
||||
@ -907,11 +907,17 @@ func (c *Context) ShouldBindHeader(obj any) error {
|
||||
// ShouldBindUri binds the passed struct pointer using the specified binding engine.
|
||||
// It works like ShouldBindJSON but binds parameters from the URI.
|
||||
func (c *Context) ShouldBindUri(obj any) error {
|
||||
return c.ShouldBindUriWith(obj, binding.Uri)
|
||||
}
|
||||
|
||||
// ShouldBindUriWith binds the passed struct pointer using the specified uri
|
||||
// binding engine. See the binding package.
|
||||
func (c *Context) ShouldBindUriWith(obj any, b binding.BindingUri) error {
|
||||
m := make(map[string][]string, len(c.Params))
|
||||
for _, v := range c.Params {
|
||||
m[v.Key] = []string{v.Value}
|
||||
}
|
||||
return binding.Uri.BindUri(m, obj)
|
||||
return b.BindUri(m, obj)
|
||||
}
|
||||
|
||||
// ShouldBindWith binds the passed struct pointer using the specified binding engine.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user