debug: use slice Stale sort

This commit is contained in:
hanwang 2023-04-24 14:43:46 +08:00
parent 32fc201554
commit 4e8ebc2897

View File

@ -249,7 +249,7 @@ func sortCallbacks(cs []*callback) (fns []func(*DB), err error) {
names, sorted []string
sortCallback func(*callback) error
)
sort.Slice(cs, func(i, j int) bool {
sort.SliceStable(cs, func(i, j int) bool {
if cs[j].before == "*" && cs[i].before != "*" {
return true
}