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 time.Time类型的字段 #18

Open
WangBeyond opened this issue May 21, 2020 · 3 comments
Open

binding time.Time类型的字段 #18

WangBeyond opened this issue May 21, 2020 · 3 comments

Comments

@WangBeyond
Copy link

比如说

startDate time.Time `json:"start_date,layout=2016-01-02"`

支持time.Time类型的field的binding,并且支持用户自定义layout

@WangBeyond WangBeyond changed the title 有计划支持binding time.Time吗? binding time.Time类型的字段 May 21, 2020
@andeya
Copy link
Member

andeya commented May 21, 2020

这个需求可以,不过每个标签都加 layout是不是会有些多呢:

startDate time.Time `json:"start_date,layout=2016-01-02" query:"start_date,layout=2016-01-02"`

@WangBeyond
Copy link
Author

ok 那还是改成

startDate time.Time `json:"start_date" query:"start_date" layout:"2016-01-02"` 

@lichi0206
Copy link

现在支持了吗?为啥这么长时间的 issue 还一直是 open 状态,也不关闭,是还没做支持吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants