Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ linters:
- godox
- goheader
- gomoddirectives
- gomodguard
- gomodguard_v2
- goprintffuncname
# - gosec
- gosmopolitan
Expand Down
1 change: 1 addition & 0 deletions benchmarks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ type benchParam struct {
maxInMemArenaString string
}

//nolint:goconst // size labels are clearer inline in the table than as named constants
func getBenchParams() []benchParam {
messageBase := "abcdefghijlkmnopqrstuvwxyzABCDEF"
// message 128 bytes
Expand Down
8 changes: 4 additions & 4 deletions bigqueue_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func TestEnqueueLargeMessage(t *testing.T) {
}
}()

msg := make([]byte, 0)
msg := make([]byte, 0, cDefaultArenaSize-8)
for range cDefaultArenaSize - 8 {
m := []byte("a")
msg = append(msg, m...)
Expand Down Expand Up @@ -166,7 +166,7 @@ func TestEnqueueOverlapLength(t *testing.T) {
}
}()

msg1 := make([]byte, 0)
msg1 := make([]byte, 0, cDefaultArenaSize-12)
for range cDefaultArenaSize - 12 {
m := []byte("a")
msg1 = append(msg1, m...)
Expand All @@ -175,7 +175,7 @@ func TestEnqueueOverlapLength(t *testing.T) {
t.Fatalf("enqueue failed :: %v", err)
}

msg2 := make([]byte, 0)
msg2 := make([]byte, 0, cDefaultArenaSize-4)
for range cDefaultArenaSize - 4 {
m := []byte("a")
msg2 = append(msg2, m...)
Expand Down Expand Up @@ -216,7 +216,7 @@ func TestEnqueueLargeNumberOfMessages(t *testing.T) {
}()

numMessages := 10
lengths := make([]int, 0)
lengths := make([]int, 0, numMessages)
alphabets := "abcdefghijklmnopqrstuvwxyz"
for range numMessages {
msgLen := rand.Intn(cDefaultArenaSize) + cDefaultArenaSize
Expand Down