generated from sigstore/sigstore-project-template
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #926 from sigstore/dependabot/go_modules/github.co…
…m/hashicorp/golang-lru-1.0.2 chore(deps): Bump github.com/hashicorp/golang-lru from 0.5.4 to 1.0.2
- Loading branch information
Showing
11 changed files
with
162 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
third_party/VENDOR-LICENSE/github.com/hashicorp/golang-lru/.golangci.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
linters: | ||
enable: | ||
- megacheck | ||
- revive | ||
- govet | ||
- unconvert | ||
- megacheck | ||
- gas | ||
- gocyclo | ||
- dupl | ||
- misspell | ||
- unparam | ||
- unused | ||
- typecheck | ||
- ineffassign | ||
- stylecheck | ||
- exportloopref | ||
- gocritic | ||
- nakedret | ||
- gosimple | ||
- prealloc | ||
fast: false | ||
disable-all: true | ||
|
||
issues: | ||
exclude-rules: | ||
- path: _test\.go | ||
linters: | ||
- dupl | ||
exclude-use-default: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
third_party/VENDOR-LICENSE/github.com/hashicorp/golang-lru/LICENSE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
Copyright (c) 2014 HashiCorp, Inc. | ||
|
||
Mozilla Public License, version 2.0 | ||
|
||
1. Definitions | ||
|
26 changes: 4 additions & 22 deletions
26
third_party/VENDOR-LICENSE/github.com/hashicorp/golang-lru/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,7 @@ | ||
golang-lru | ||
========== | ||
|
||
This provides the `lru` package which implements a fixed-size | ||
thread safe LRU cache. It is based on the cache in Groupcache. | ||
|
||
Documentation | ||
============= | ||
|
||
Full docs are available on [Godoc](http://godoc.org/github.com/hashicorp/golang-lru) | ||
|
||
Example | ||
======= | ||
|
||
Using the LRU is very simple: | ||
|
||
```go | ||
l, _ := New(128) | ||
for i := 0; i < 256; i++ { | ||
l.Add(i, nil) | ||
} | ||
if l.Len() != 128 { | ||
panic(fmt.Sprintf("bad len: %v", l.Len())) | ||
} | ||
``` | ||
Please upgrade to github.com/hashicorp/golang-lru/v2 for all new code as v1 will | ||
not be updated anymore. The v2 version supports generics and is faster; old code | ||
can specify a specific tag, e.g. github.com/hashicorp/golang-lru/v1.0.2 for | ||
backwards compatibility. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
third_party/VENDOR-LICENSE/github.com/hashicorp/golang-lru/testing.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package lru | ||
|
||
import ( | ||
"crypto/rand" | ||
"math" | ||
"math/big" | ||
"testing" | ||
) | ||
|
||
func getRand(tb testing.TB) int64 { | ||
out, err := rand.Int(rand.Reader, big.NewInt(math.MaxInt64)) | ||
if err != nil { | ||
tb.Fatal(err) | ||
} | ||
return out.Int64() | ||
} |