Skip to content

Commit

Permalink
build: fix string compare for SortFunc (#29595)
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronChen0 authored Apr 21, 2024
1 parent 98f504f commit 28ccb2b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build/update-license.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,8 @@ func writeAuthors(files []string) {
}
}
// Write sorted list of authors back to the file.
slices.SortFunc(list, func(a, b string) bool {
return strings.ToLower(a) < strings.ToLower(b)
slices.SortFunc(list, func(a, b string) int {
return strings.Compare(strings.ToLower(a), strings.ToLower(b))
})
content := new(bytes.Buffer)
content.WriteString(authorsFileHeader)
Expand Down

0 comments on commit 28ccb2b

Please sign in to comment.