-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
FillStructWithDefault did not support setting default value recursively for nested struct #3221
Labels
Comments
gqcn
added
enhancement
help wanted
planned
This issue/proposal is planned into our next steps.
labels
Dec 20, 2023
Hello @zhangyuyu. We like your proposal/feedback and would appreciate a contribution via a Pull Request by you or another community member. We thank you in advance for your contribution and are looking forward to reviewing it! |
oldme-git
added a commit
to oldme-git/gf
that referenced
this issue
Dec 21, 2023
oldme-git
added a commit
to oldme-git/gf
that referenced
this issue
Dec 21, 2023
Merged
oldme-git
added a commit
to oldme-git/gf
that referenced
this issue
Dec 22, 2023
oldme-git
added a commit
to oldme-git/gf
that referenced
this issue
Dec 22, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
1. What version of
Go
and system type/arch are you using?go version go1.21.3 darwin/arm64
2. What version of
GoFrame
are you using?2.6.0
3. Can this issue be re-produced with the latest release?
yes
4. What did you do?
5. What did you expect to see?
When struct
Config
have a nested structService
, it can set default value for bothConfig
andService
.&{Name:zhangsan Enable1:true Enable2:false Service:{Env: AppID:testApp IsDebug:true EnableCache:false}}
6. What did you see instead?
It only set the default value for outer Struct
Config
, ignore the default tag for inner structService
.&{Name:zhangsan Enable1:true Enable2:false Service:{Env: AppID: IsDebug:false EnableCache:false}}
The text was updated successfully, but these errors were encountered: