Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow bound interface to be a slice of data #1574

Closed
wants to merge 2 commits into from

Conversation

benoitmasson
Copy link

@benoitmasson benoitmasson commented May 19, 2020

Do not throw an error when binding to a slice, if binding occurs
on path- or query-parameters
=> data is very likely to be found in the body, which will be bound later

Should fix #1356, fix #1448, partially fix #1495 (second case), fix #1565

- for JSON, XML and Multipart payloads
- without and with extra (dummy) query parameters, which make the tests fail
  (see e.g. labstack#1565)
Do not throw an error when binding to a slice, if binding occurs
on path- or query-parameters
=> data is very likely to be found in the body, which will be bound later

Should fix labstack#1356, labstack#1448, labstack#1495 (second case), labstack#1565
@codecov
Copy link

codecov bot commented May 19, 2020

Codecov Report

Merging #1574 into master will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1574      +/-   ##
==========================================
+ Coverage   84.96%   84.97%   +0.01%     
==========================================
  Files          28       28              
  Lines        2168     2170       +2     
==========================================
+ Hits         1842     1844       +2     
  Misses        211      211              
  Partials      115      115              
Impacted Files Coverage Δ
bind.go 85.88% <100.00%> (+0.16%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 43e32ba...5256b3b. Read the comment docs.

@stale
Copy link

stale bot commented Aug 9, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Aug 9, 2020
@stale stale bot closed this Aug 16, 2020
aldas added a commit to aldas/echo that referenced this pull request Apr 6, 2021
… not being struct.

For path/query params binding we do not try (silently return) to bind when target is not struct.
Recreates PR labstack#1574 and fixes labstack#1565
lammel pushed a commit that referenced this pull request Apr 6, 2021
…target not being struct (#1835)

For path/query params binding we do not try (silently return) to bind when target is not struct.
Recreates PR #1574 and fixes #1565
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants