We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
仅限中文
在自带的反射包里面,IsNil 只能在特定类型是调用,例如说 channel, map 之类的。如果在其他类型上调用,例如说基本类型,那么会引起 panic。
这种语义十分违背直觉,因为我们会预期说如果类型不对,那么我们就返回 false。
所以现在我们尝试在 ekit 里面提供类似的方法 IsNil。
那么对于这些会引起 panic 的类型,我们就返回一个false。
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
仅限中文
使用场景
在自带的反射包里面,IsNil 只能在特定类型是调用,例如说 channel, map 之类的。如果在其他类型上调用,例如说基本类型,那么会引起 panic。
这种语义十分违背直觉,因为我们会预期说如果类型不对,那么我们就返回 false。
所以现在我们尝试在 ekit 里面提供类似的方法 IsNil。
那么对于这些会引起 panic 的类型,我们就返回一个false。
The text was updated successfully, but these errors were encountered: