diff --git a/pebble/internal/base/internal.go b/pebble/internal/base/internal.go index db691ee..9094c5f 100644 --- a/pebble/internal/base/internal.go +++ b/pebble/internal/base/internal.go @@ -10,8 +10,8 @@ import ( "strconv" "strings" - "github.com/cockroachdb/redact" "github.com/cockroachdb/pebble/shims/cmp" + "github.com/cockroachdb/redact" ) const ( diff --git a/pebble/shims/slices/zsortanyfunc.go b/pebble/shims/slices/zsortanyfunc.go index 386910c..448a91c 100644 --- a/pebble/shims/slices/zsortanyfunc.go +++ b/pebble/shims/slices/zsortanyfunc.go @@ -135,7 +135,9 @@ func pdqsortCmpFunc[E any](data []E, a, b, limit int, cmp func(a, b E) int) { // Let p = data[pivot] // Moves elements in data[a:b] around, so that data[i]

=p for inewpivot. // On return, data[newpivot] = p -func partitionCmpFunc[E any](data []E, a, b, pivot int, cmp func(a, b E) int) (newpivot int, alreadyPartitioned bool) { +func partitionCmpFunc[E any]( + data []E, a, b, pivot int, cmp func(a, b E) int, +) (newpivot int, alreadyPartitioned bool) { data[a], data[pivot] = data[pivot], data[a] i, j := a+1, b-1 // i and j are inclusive of the elements remaining to be partitioned @@ -261,7 +263,9 @@ func breakPatternsCmpFunc[E any](data []E, a, b int, cmp func(a, b E) int) { // [0,8): chooses a static pivot. // [8,shortestNinther): uses the simple median-of-three method. // [shortestNinther,∞): uses the Tukey ninther method. -func choosePivotCmpFunc[E any](data []E, a, b int, cmp func(a, b E) int) (pivot int, hint sortedHint) { +func choosePivotCmpFunc[E any]( + data []E, a, b int, cmp func(a, b E) int, +) (pivot int, hint sortedHint) { const ( shortestNinther = 50 maxSwaps = 4 * 3 diff --git a/pebble/shims/slices/zsortordered.go b/pebble/shims/slices/zsortordered.go index d2d2e7d..454067b 100644 --- a/pebble/shims/slices/zsortordered.go +++ b/pebble/shims/slices/zsortordered.go @@ -137,7 +137,9 @@ func pdqsortOrdered[E cmp.Ordered](data []E, a, b, limit int) { // Let p = data[pivot] // Moves elements in data[a:b] around, so that data[i]

=p for inewpivot. // On return, data[newpivot] = p -func partitionOrdered[E cmp.Ordered](data []E, a, b, pivot int) (newpivot int, alreadyPartitioned bool) { +func partitionOrdered[E cmp.Ordered]( + data []E, a, b, pivot int, +) (newpivot int, alreadyPartitioned bool) { data[a], data[pivot] = data[pivot], data[a] i, j := a+1, b-1 // i and j are inclusive of the elements remaining to be partitioned diff --git a/pebble/sstable/category_stats.go b/pebble/sstable/category_stats.go index 4a5d5e3..3978609 100644 --- a/pebble/sstable/category_stats.go +++ b/pebble/sstable/category_stats.go @@ -8,9 +8,9 @@ import ( "sync" "github.com/cockroachdb/errors" - "github.com/cockroachdb/redact" "github.com/cockroachdb/pebble/shims/cmp" "github.com/cockroachdb/pebble/shims/slices" + "github.com/cockroachdb/redact" ) // Category is a user-understandable string, where stats are aggregated for