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
在没有填任何值的时候,slice的字段应该返回nil或者长度为0的slice,现在的实现,会返回一个[ "" ],非常不自然,且不利于编写业务逻辑 具体代码在170行: case reflect.Slice: sep := ";" s, exist := sf.Tag.Lookup("slice_sep") if exist && s != "" { sep = s } //我新加的 if ev == ""{ return nil } //我新加的 end vals := strings.Split(ev, sep)
The text was updated successfully, but these errors were encountered:
got it, 你也可以提个commit
Sorry, something went wrong.
No branches or pull requests
在没有填任何值的时候,slice的字段应该返回nil或者长度为0的slice,现在的实现,会返回一个[ "" ],非常不自然,且不利于编写业务逻辑
具体代码在170行:
case reflect.Slice:
sep := ";"
s, exist := sf.Tag.Lookup("slice_sep")
if exist && s != "" {
sep = s
}
//我新加的
if ev == ""{
return nil
}
//我新加的 end
vals := strings.Split(ev, sep)
The text was updated successfully, but these errors were encountered: