build: fix string compare for SortFunc (#29595)

pull/29602/head
Aaron Chen 5 months ago committed by GitHub
parent 98f504f69f
commit 28ccb2bbf8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      build/update-license.go

@ -291,8 +291,8 @@ func writeAuthors(files []string) {
} }
} }
// Write sorted list of authors back to the file. // Write sorted list of authors back to the file.
slices.SortFunc(list, func(a, b string) bool { slices.SortFunc(list, func(a, b string) int {
return strings.ToLower(a) < strings.ToLower(b) return strings.Compare(strings.ToLower(a), strings.ToLower(b))
}) })
content := new(bytes.Buffer) content := new(bytes.Buffer)
content.WriteString(authorsFileHeader) content.WriteString(authorsFileHeader)

Loading…
Cancel
Save