hertz icon indicating copy to clipboard operation
hertz copied to clipboard

feat: add more default type for binding

Open FGYFFFF opened this issue 1 year ago • 1 comments

What type of PR is this?

feat

Check the PR title.

  • [ ] This PR title match the format: <type>(optional scope): <description>
  • [ ] The description of this PR title is user-oriented and clear enough for others to understand.
  • [ ] Attach the PR updating the user documentation if the current PR requires user awareness at the usage level. User docs repo

(Optional) Translate the PR title into Chinese.

为参数绑定提供更多的默认类型支持

(Optional) More detailed description for this PR(en: English/zh: Chinese).

en: 为参数绑定提供更多的默认类型支持 zh(optional): add more default type for binding

  • 增加了 map、struct、slice 等类型的默认值处理
  • 降低 default value 的优先级,避免在做完 json.unmarshal() 后,default value 将其值覆盖

(Optional) Which issue(s) this PR fixes:

(Optional) The PR that updates user documentation:

FGYFFFF avatar Jan 30 '24 13:01 FGYFFFF

Fix the conflict

welkeyever avatar Mar 05 '24 03:03 welkeyever

"降低 default value 的优先级,避免在做完 json.unmarshal() 后,default value 将其值覆盖" 我也遇到了这个缺陷, 希望能尽快合并

archever avatar Apr 07 '24 12:04 archever

"降低 default value 的优先级,避免在做完 json.unmarshal() 后,default value 将其值覆盖" 我也遇到了这个缺陷, 希望能尽快合并

ok, 明天我推进一下合入

FGYFFFF avatar Apr 07 '24 12:04 FGYFFFF

@archever 已合入,请 go get develop 分支进行测试~

FGYFFFF avatar Apr 12 '24 03:04 FGYFFFF