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

当获取不到配置的时候,指针类型应该赋予nil #118

Open
yankooo opened this issue Jun 23, 2020 · 1 comment
Open

当获取不到配置的时候,指针类型应该赋予nil #118

yankooo opened this issue Jun 23, 2020 · 1 comment

Comments

@yankooo
Copy link
Collaborator

yankooo commented Jun 23, 2020

if rValue.IsNil() {

在使用UnmarshalConfig的时候,如果yaml文件或者任意一个配置源获取不到配置,该项字段应该赋予零值,指针类型赋予nil。

@tianxiaoliang
Copy link
Member

感谢指出,请提PR吧

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

2 participants