Skip to content

Commit

Permalink
goreleaser v2 (#30)
Browse files Browse the repository at this point in the history
Needed to update the .goreleaser.yml file to match the new schema. Also ignored some linter warnings
  • Loading branch information
dangermike authored Jun 18, 2024
1 parent 062025b commit af71fc4
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
14 changes: 12 additions & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
version: 2

project_name: lazylru
build:
skip: true

builds:
- skip: true

release:
github:
name: TriggerMail/lazylru
prerelease: auto

changelog:
sort: asc
2 changes: 1 addition & 1 deletion lazylru.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ func (lru *LazyLRU[K, V]) reap(start int, deathList []*item[K, V]) {
break
}
if start < 0 {
start = rand.IntN(len(lru.items))
start = rand.IntN(len(lru.items)) //nolint:gosec
}
end := start + 100 // why 100? no idea
if end > len(lru.items) {
Expand Down
4 changes: 2 additions & 2 deletions lazylru_benchmark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (bc benchconfig) InterfaceArray(b *testing.B) {
b.ResetTimer()
for i := 0; i < b.N; i++ {
ix := i % bc.keyCount
if rand.Float64() < bc.readRate {
if rand.Float64() < bc.readRate { //nolint:gosec
// if true {
if iv, ok := lru.Get(keys[ix]); !ok {
continue
Expand Down Expand Up @@ -91,7 +91,7 @@ func (bc benchconfig) GenericArray(b *testing.B) {
b.ResetTimer()
for i := 0; i < b.N; i++ {
ix := i % bc.keyCount
if rand.Float64() < bc.readRate {
if rand.Float64() < bc.readRate { //nolint:gosec
// if true {
if v, ok := lru.Get(keys[ix]); !ok {
continue
Expand Down

0 comments on commit af71fc4

Please sign in to comment.