Skip to content

Commit

Permalink
Merge pull request #8971 from gyuho/gosimple
Browse files Browse the repository at this point in the history
*: fix gosimple warnings on sort.StringSlice
  • Loading branch information
gyuho committed Dec 5, 2017
2 parents 70db68b + 21d4307 commit 1481922
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion auth/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion lease/lessor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 1481922

Please sign in to comment.