mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #8971 from gyuho/gosimple
*: fix gosimple warnings on sort.StringSlice
This commit is contained in:
commit
148192245c
@ -458,7 +458,7 @@ func (as *authStore) UserGrantRole(r *pb.AuthUserGrantRoleRequest) (*pb.AuthUser
|
||||
}
|
||||
|
||||
user.Roles = append(user.Roles, r.Role)
|
||||
sort.Sort(sort.StringSlice(user.Roles))
|
||||
sort.Strings(user.Roles)
|
||||
|
||||
putUser(tx, user)
|
||||
|
||||
|
@ -183,7 +183,7 @@ func TestLessorRevoke(t *testing.T) {
|
||||
}
|
||||
|
||||
wdeleted := []string{"bar_", "foo_"}
|
||||
sort.Sort(sort.StringSlice(fd.deleted))
|
||||
sort.Strings(fd.deleted)
|
||||
if !reflect.DeepEqual(fd.deleted, wdeleted) {
|
||||
t.Errorf("deleted= %v, want %v", fd.deleted, wdeleted)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user