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

binding: support binding query #163

Open
1 task done
asjdf opened this issue Apr 28, 2023 · 0 comments
Open
1 task done

binding: support binding query #163

asjdf opened this issue Apr 28, 2023 · 0 comments
Labels
🎯 feature Categorizes as related to a new feature

Comments

@asjdf
Copy link
Contributor

asjdf commented Apr 28, 2023

Component

Middleware

Middleware

https://github.com/flamego/binding/

Is your feature request related to a problem? Please describe

Support binding query parameters into struct.

Describe the solution you'd like

type query struct {
	Username string `query:"username" validate:"required"`
	Password string `query:"password" validate:"required"`
}
f.Get("/", Query(query{}, opts), func(c flamego.Context) {
	_, _ = c.ResponseWriter().Write([]byte("Hello world"))
})

Describe alternatives you've considered

nil

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@asjdf asjdf added the 🎯 feature Categorizes as related to a new feature label Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎯 feature Categorizes as related to a new feature
Projects
None yet
Development

No branches or pull requests

1 participant