mirror of https://github.com/go-gorm/gorm.git
debug: use slice Stale sort (#6263)
Co-authored-by: hanwang <hanwang.7721@bytedance.com>
This commit is contained in:
parent
407bedae0a
commit
aeb298635b
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue