Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix slices.SortFunc #2

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,9 @@ This library is forked from [go-proton-api](https://github.com/ProtonMail/go-pro
Contribution is welcomed!

The intention to upstream the changes are planned, once the changes to the codebase has stabalized.

### Rebase

As we will try to contribute back to the upstream in the future, the dev branch is always rebased against the upstream master branch.

One important note is that we need to replace `github.com/ProtonMail/go-proton-api` with `github.com/henrybear327/go-proton-api` for all files!
4 changes: 2 additions & 2 deletions address.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ func (c *Client) GetAddresses(ctx context.Context) ([]Address, error) {
return nil, err
}

slices.SortFunc(res.Addresses, func(a, b Address) int {
return a.Order - b.Order
slices.SortFunc(res.Addresses, func(a, b Address) bool {
return a.Order < b.Order
})

return res.Addresses, nil
Expand Down
Loading