openconfig / ygot

A YANG-centric Go toolkit - Go/Protobuf Code Generation; Validation; Marshaling/Unmarshaling
Apache License 2.0
285 stars 107 forks source link

`slices.SortFunc`'s `cmp` function uses wrong return type #896

Closed jayzhudev closed 1 year ago

jayzhudev commented 1 year ago

I noticed that the change in #894 uses slices.SortFunc with bool as the cmp function's return type which seems to be inconsistent compared to what I saw in the docs and in the standard library source code.

Both of the following use int as the return type

This change also seems to break support for the latest 3 Go release.

Thank you!

wenovus commented 1 year ago

Thanks Jay, we have just fixed this here: https://github.com/openconfig/ygot/releases/tag/v0.29.5

jayzhudev commented 1 year ago

Thanks Jay, we have just fixed this here: https://github.com/openconfig/ygot/releases/tag/v0.29.5

That's awesome, thanks!