Skip to content

Commit

Permalink
Update client.go
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisPates committed Jun 20, 2024
1 parent 4f2470e commit 0f0d548
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions internal/google/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,8 @@ func (c *client) GetUsers(query string) ([]*admin.User, error) {
// Identity Store will accept and a 'space' for an empty name but not a 'zero width space'
// So we need to replace any 'zero width space' strings with a single 'space' to allow comparison and sync
for _, user := range u {
if user.Name.GivenName == string("\u200B") {
user.Name.GivenName = " "
}
if user.Name.FamilyName == string("\u200B") {
user.Name.FamilyName = " "
}
strings.Replace(user.Name.GivenName, string('\u200B'), " ", -1)

Check failure on line 137 in internal/google/client.go

View workflow job for this annotation

GitHub Actions / test

Replace doesn't have side effects and its return value is ignored (SA4017)
strings.Replace(user.Name.FamilyName, string('\u200B'), " ", -1)

Check failure on line 138 in internal/google/client.go

View workflow job for this annotation

GitHub Actions / test

Replace doesn't have side effects and its return value is ignored (SA4017)
}

// Check we've got some users otherwise something is wrong.
Expand Down

0 comments on commit 0f0d548

Please sign in to comment.