Skip to content

Commit 26647e3

Browse files
authored
Merge pull request #343 from bootjp/copilot/sub-pr-342
store: replace binary.Write with binary.BigEndian.PutUint64 in encodeSortableInt64
2 parents 4dbc4ec + a0e0154 commit 26647e3

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,15 @@ require (
1313
github.com/aws/aws-sdk-go-v2/config v1.32.11
1414
github.com/aws/aws-sdk-go-v2/credentials v1.19.11
1515
github.com/aws/aws-sdk-go-v2/service/dynamodb v1.56.1
16+
github.com/aws/smithy-go v1.24.2
1617
github.com/cockroachdb/errors v1.12.0
1718
github.com/cockroachdb/pebble v1.1.5
1819
github.com/emirpasic/gods v1.18.1
1920
github.com/hashicorp/go-hclog v1.6.3
2021
github.com/hashicorp/raft v1.7.3
2122
github.com/hashicorp/raft-boltdb/v2 v2.3.1
2223
github.com/pkg/errors v0.9.1
24+
github.com/prometheus/client_golang v1.16.0
2325
github.com/redis/go-redis/v9 v9.18.0
2426
github.com/spaolacci/murmur3 v1.1.0
2527
github.com/stretchr/testify v1.11.1
@@ -45,7 +47,6 @@ require (
4547
github.com/aws/aws-sdk-go-v2/service/sso v1.30.12 // indirect
4648
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.16 // indirect
4749
github.com/aws/aws-sdk-go-v2/service/sts v1.41.8 // indirect
48-
github.com/aws/smithy-go v1.24.2 // indirect
4950
github.com/beorn7/perks v1.0.1 // indirect
5051
github.com/boltdb/bolt v1.3.1 // indirect
5152
github.com/cespare/xxhash/v2 v2.3.0 // indirect
@@ -74,7 +75,6 @@ require (
7475
github.com/mattn/go-isatty v0.0.19 // indirect
7576
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
7677
github.com/pmezard/go-difflib v1.0.0 // indirect
77-
github.com/prometheus/client_golang v1.16.0 // indirect
7878
github.com/prometheus/client_model v0.3.0 // indirect
7979
github.com/prometheus/common v0.42.0 // indirect
8080
github.com/prometheus/procfs v0.10.1 // indirect

store/list_helpers.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,7 @@ func encodeSortableInt64(dst []byte, seq int64) {
8787
if len(dst) < sortableInt64Bytes {
8888
return
8989
}
90-
buf := bytes.NewBuffer(dst[:0])
91-
_ = binary.Write(buf, binary.BigEndian, seq^math.MinInt64)
90+
binary.BigEndian.PutUint64(dst, uint64(seq^math.MinInt64))
9291
}
9392

9493
// IsListMetaKey Exported helpers for other packages (e.g., Redis adapter).

0 commit comments

Comments
 (0)