diff --git a/.goreleaser.yml b/.goreleaser.yml index b934ef7..11ca896 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -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 diff --git a/lazylru.go b/lazylru.go index f14344a..5fea684 100644 --- a/lazylru.go +++ b/lazylru.go @@ -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) { diff --git a/lazylru_benchmark_test.go b/lazylru_benchmark_test.go index 8f740e0..510a6b2 100644 --- a/lazylru_benchmark_test.go +++ b/lazylru_benchmark_test.go @@ -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 @@ -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