Merge pull request #8971 from gyuho/gosimple

*: fix gosimple warnings on sort.StringSlice
This commit is contained in:
Gyuho Lee 2017-12-04 16:13:57 -08:00 committed by GitHub
commit 148192245c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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)
}