空指针异常修复

This commit is contained in:
jinnrry
2024-01-29 19:38:33 +08:00
parent 2467061431
commit dbc125d1c2
3 changed files with 98 additions and 0 deletions

View File

@@ -182,6 +182,10 @@ func buildUser(str string) *User {
func buildUsers(str []string) []*User {
var ret []*User
for _, s1 := range str {
if s1 == "" {
continue
}
for _, s := range strings.Split(s1, ",") {
s = strings.TrimSpace(s)
ret = append(ret, buildUser(s))