Fix shadow issue in CI

This commit is contained in:
Cristian Le 2021-05-04 13:47:17 +09:00
parent 08e5ec6ad1
commit 21732f213b

View file

@ -354,7 +354,7 @@ func DefaultIdentityFunc(ctx context.Context, p Interface, email string, usernam
if !sshUserRegex.MatchString(name) {
return nil, errors.Errorf("invalid principal '%s' from email '%s'", name, email)
}
usernames := append(usernames, name)
usernames = append(usernames, name)
if i := strings.LastIndex(email, "@"); i >= 0 {
usernames = append(usernames, email[:i])
}