mirror of
https://github.com/etcd-io/bbolt.git
synced 2025-07-07 19:19:53 +00:00
Merge pull request #65 from benbjohnson/fix-tx-buckets-sort-order
Fix Tx.Buckets() sort order.
This commit is contained in:
commit
1c7b59a4c2
@ -155,3 +155,9 @@ type BucketStat struct {
|
||||
KeyCount int
|
||||
MaxDepth int
|
||||
}
|
||||
|
||||
type bucketsByName []*Bucket
|
||||
|
||||
func (s bucketsByName) Len() int { return len(s) }
|
||||
func (s bucketsByName) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
|
||||
func (s bucketsByName) Less(i, j int) bool { return s[i].name < s[j].name }
|
||||
|
Loading…
x
Reference in New Issue
Block a user