Skip to content
This repository has been archived by the owner on May 28, 2024. It is now read-only.

Commit

Permalink
upgrade to latest dependencies
Browse files Browse the repository at this point in the history
bumping go.uber.org/zap a55bdc3...56468e7:
  > 56468e7 Release v1.25.0
  > 249507a zap.Any: Reduce stack size with generics (# 1310)
  > 50b2db4 zap.Any add benchmarks
  > a0674c8 Add direct coverage to zap.Any (# 1309)
  > 1310691 Table test TestFieldConstructors
  > 382e251 Swap expected and got fields (# 1282)
  > 24b7977 Add Name() to Logger (# 1273)
  > 1155ed3 Introduce Str + Strs generic string helpers (# 1281)
  > 4451b47 exp: Update slog, adjust for changes (# 1276)
  > 845ca51 internal: Add and use a generic pool instead of using sync.Pool directly (# 1262)
  > 42b7ef0 slog: Ignore frames with a zero PC (# 1258)
  > 05c4b6c Remove dependency on github.com/pkg/errors (# 1255)
  > d1a1923 Minimize permissions on CI workflows (# 1257)
  > 384e782 Use sync/atomic, drop external atomics (# 1253)
  > 740fda7 TestLevelFlag: Don't print to stderr (# 1254)
  > f2f1f41 [Feature] Add  experiment `zapslog` package to integrate with slog (# 1246)
  > 54862f5 benchmark: add slog (# 1245)
  > 85c4932 Add govulncheck as a CI step (# 1239)
  > f4ba5f5 make: Switch from golint to revive (# 1238)
  > 8310f89 chore: update bench package versions and results (# 1207)
  > 8d89127 Bump actions/checkout from 2 to 3 (# 1237)
  > bc64796 doc: New{Production,Development}Encoder{,Config} (# 1234)
  > 692ec13 ci: Set up dependabot for GH actions and tools (# 1236)
  > 7d6a9af ci: Test with Go 1.19 and 1.20 (# 1235)
  > d4a1083 doc(SugaredLogger): Document print, printf, and println methods (# 1233)
  > b32f3c5 Update Snyk vulnerable modules (# 1227)
  > 53fdb6f Reverse comparison for readability (# 1228)
  > 077b03e Use iota like a original from grpc-go (# 1220)
bumping knative.dev/hack 044c02b...9cc05a3:
  > 9cc05a3 Deprecate calling kubetest2 via kntest (# 230)
bumping github.com/benbjohnson/clock 307483a...68df829:
  > 68df829 Merge pull request # 41 from morigs/master
  > 5178ebe Merge pull request # 40 from djmitche/issue39
  > b6e5242 Add essential context tests
  > 1ae85fe Merge pull request # 37 from djmitche/issue8
  > 26f124e add docs badge to README
  > a284242 Remove meaningles callback for cancelled context
  > 0a12ec5 Merge pull request # 38 from djmitche/issue29
  > 47e2ce0 use atomics instead of channels
  > 3e4357c Use Until instead of Sub in WithDeadline
  > 4378ee0 Merge pull request # 36 from djmitche/issue30
  > eb95674 Apply suggestions from code review
  > 99d58a2 Use channels to avoid races in tests
  > 6754fcb Add mock implementation of context methods and type check
  > f495692 Merge pull request # 35 from djmitche/issue33
  > 850609f add a Duration type alias
  > 37a1270 add Until
  > 83715db Add context WithDeadline/WithTimeout methods to Clock interface
  > 5ad814c add note about maintenance
  > 0b9476f Address re-entrancy of Tick
  > f7a1d13 Merge pull request # 34 from djmitche/test-fixes
  > c97fc7b Merge pull request # 28 from dcherman/master
  > ae80999 Fix tests to not call t.Fatal from a goroutine
  > 4031354 Merge pull request # 26 from narqo/patch-1
  > 0f43ae6 Implement reset for mocked tickers
  > 9d456ff Fix typo in Ticker example
bumping google.golang.org/api 113082d...85e7e70:
  > 85e7e70 chore(main): release 0.138.0 (# 2116)
  > 9b75278 feat(all): auto-regenerate discovery clients (# 2119)
  > 40ea606 feat(all): auto-regenerate discovery clients (# 2118)
  > 1770219 feat(all): auto-regenerate discovery clients (# 2115)
  > c631c0a chore(main): release 0.137.0 (# 2107)
  > caea956 feat: ok to use S2A with override endpoint (# 2114)
  > 142ffeb feat(all): auto-regenerate discovery clients (# 2113)
  > f7f1c7b feat(all): auto-regenerate discovery clients (# 2112)
  > 0cc62ab feat(all): auto-regenerate discovery clients (# 2111)
  > 4d775db feat(all): auto-regenerate discovery clients (# 2110)
  > 6d29bab chore(all): update module github.com/google/s2a-go to v0.1.5 (# 2109)
  > 80485e0 feat(all): auto-regenerate discovery clients (# 2108)
  > 3f3ed3d feat(all): auto-regenerate discovery clients (# 2106)
bumping go.uber.org/multierr 3114a8b...8767aa9:
  > 8767aa9 Prepare release v1.10 (# 74)
  > 4504ef7 README: Add Features section (# 73)
  > 2fd451d Drop external atomic dependency (# 72)
  > 7876a02 Remove unused glide.yaml (# 71)
  > 55bc553 Support Go 1.20 Unwrap() []error (# 69)
  > 39ca40c Prepare release v1.9.0 (# 68)
  > 4459990 Add a shorthand for AppendInvoke (# 65)
  > 80b07a7 Document named return constraint for defer (# 63)
  > 492b792 Test and lint against Go 1.19 (# 62)
  > aa8f15f Upgrade to yaml.v3 3.0.1 (# 60)
  > f46d400 Use append instead of copy to clone slices (# 58)
  > 6fede5c CI: Test against Go 1.17/1.18 (# 57)
  > 10aaa3c Prepare release v1.8.0 (# 56)
  > cea7d2e Combine: Optimize for all nil (# 55)
  > d49c2ba doc: AppendInvoke: Fix typo (# 54)
  > ee7346a Merge pull request # 52 from uber-go/fossa
  > 7c6ff6f Integrate FOSSA (# 51)
  > d9efa4b fossa: Run separately, only on push
  > a5cd550 Release v1.7.0 (# 50)
  > a20a852 ci: Use GitHub Workflows (# 49)
  > 1014a7c AppendInvoke: Merge test, real example (# 48)
  > 0b65632 Use GitHub workflows
  > a402392 Add AppendInvoke (# 47)
  > 520752c Update license headers everywhere
  > e015acf error.go: Fix typo of doc (# 44)
  > 40de9b0 tools: Update to latest versions
  > 8b005e6 doc: change godoc to go.dev (# 45)
  > b78aea8 tools: Delete update-license
  > 0eb6eb5 Drop Go 1.12 support (# 41)
bumping github.com/hashicorp/golang-lru 14eae34...a032ef5:
  > a032ef5 Update README for v1.0.2
  > bdf35e3 Remove deprecated linters
  > bc1608d Update other tests to get rid of math/rand
  > f2408b3 Update test to remove bad rand usage
  > fa11c6b Update github workflow
  > 6da3f98 Update MPL 2.0 LICENSE (# 110)
  > d4900dc fix onEvictedCB bug (# 84)
  > 003b81b Update go doc url (# 93)
  > 80c9821 rework lru's external registered callback invocation to avoid concurr… (# 80)
  > eb52994 Code quality improvements (# 67)
bumping knative.dev/pkg 4f651e0...81e4ee1:
  > 81e4ee1 Bump go.uber.org/zap from 1.24.0 to 1.25.0 (# 2800)
  > 2aafe0e Bump cloud.google.com/go/storage from 1.31.0 to 1.32.0 (# 2801)
  > 2ad39e9 Bump github.com/hashicorp/golang-lru from 0.5.4 to 1.0.2 (# 2804)
  > d36cc59 Bump google.golang.org/api from 0.136.0 to 0.138.0 (# 2802)
  > 35b0890 Bump go.uber.org/automaxprocs from 1.4.0 to 1.5.3 (# 2803)
  > 93a9858 upgrade to latest dependencies (# 2799)
bumping go.uber.org/automaxprocs 1c8b231...e83e959:
  > e83e959 Release v1.5.3 (# 77)
  > 9440450 Update actions (# 76)
  > 4b0a5c9 set CI perms to readonly (# 75)
  > c64632e Drop Go 1.17 and Go 1.18 from CI (# 74)
  > 60f2278 fix: mountinfo parsing (# 73)
  > d064ede Fix division by zero (# 71)
  > f6364fc Release v1.5.2
  > e1c1306 Test against Go 1.20
  > 77a1338 CI: upgrade staticcheck to v2023.1.2 to make test pass, Add go1.19
  > abb2d82 Bump golang.org/x/sys in /tools (# 60)
  > 58f5aee typo fix in runtime.go
  > db7cbd0 Merge pull request # 57 from rphillips/fix_leak
  > 0b356b1 Upgrade to yaml.v3 3.0.1 (# 55)
  > 1759cfc defer close cpuMaxParams to fix leak
  > d835ace Support child control cgroups in cgroupsv2 (# 53)
  > ce572da README: add performance section (# 52)
  > 297d7ee Release v1.5.1 (# 51)
  > 721b013 cgroups2: Fix mountpoint detection (# 50)
  > 2e85815 Release v1.5.0 (# 48)
  > ad6f05b Support cgroups v2 (# 44)
  > 7ff767a CI: Run against Go 1.17, 1.18 (# 47)
  > beef368 ci: Test with Go 1.16/1.17, lint on 1.17 (# 46)
  > 975e177 maxprocs.go: fix typo (# 45)
  > 0180b04 fossa: Run separately, only on push (# 40)
  > 1cf66b1 Integrate FOSSA (# 39)
  > 6fdb667 ci: Use GitHub Workflow (# 37)

Signed-off-by: Knative Automation <automation@knative.team>
  • Loading branch information
knative-automation committed Aug 21, 2023
1 parent 9cdc412 commit c8e5c1f
Show file tree
Hide file tree
Showing 68 changed files with 1,550 additions and 519 deletions.
16 changes: 8 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ go 1.18

require (
github.com/google/go-cmp v0.5.9
github.com/hashicorp/golang-lru v0.5.4
github.com/hashicorp/golang-lru v1.0.2
golang.org/x/crypto v0.12.0
golang.org/x/sync v0.3.0
k8s.io/api v0.26.5
k8s.io/apimachinery v0.26.5
k8s.io/client-go v0.26.5
knative.dev/hack v0.0.0-20230815012940-044c02b7a447
knative.dev/hack v0.0.0-20230818155117-9cc05a31e8c0
knative.dev/networking v0.0.0-20230817140742-4bfcc9fb6012
knative.dev/pkg v0.0.0-20230815132840-4f651e092853
knative.dev/pkg v0.0.0-20230821102121-81e4ee140363
)

require (
contrib.go.opencensus.io/exporter/ocagent v0.7.1-0.20200907061046-05415f1de66d // indirect
contrib.go.opencensus.io/exporter/prometheus v0.4.2 // indirect
github.com/benbjohnson/clock v1.1.0 // indirect
github.com/benbjohnson/clock v1.3.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/blendle/zapdriver v1.3.1 // indirect
Expand Down Expand Up @@ -62,9 +62,9 @@ require (
github.com/spf13/pflag v1.0.5 // indirect
go.opencensus.io v0.24.0 // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/automaxprocs v1.4.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
go.uber.org/zap v1.24.0 // indirect
go.uber.org/automaxprocs v1.5.3 // indirect
go.uber.org/multierr v1.10.0 // indirect
go.uber.org/zap v1.25.0 // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/net v0.14.0 // indirect
golang.org/x/oauth2 v0.11.0 // indirect
Expand All @@ -74,7 +74,7 @@ require (
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.12.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect
google.golang.org/api v0.136.0 // indirect
google.golang.org/api v0.138.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230803162519-f966b187b2e5 // indirect
Expand Down
34 changes: 17 additions & 17 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A=
github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
Expand Down Expand Up @@ -187,8 +187,8 @@ github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3 h1:lLT7ZLSzGLI08vc9cpd+tYmNWjd
github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w=
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc=
github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c=
github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/imdario/mergo v0.3.9 h1:UauaLniWCFHWd+Jp9oCEkTBj8VO/9DKg3PV3VCNMDIg=
github.com/imdario/mergo v0.3.9/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
Expand Down Expand Up @@ -250,6 +250,7 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g=
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M=
Expand Down Expand Up @@ -321,18 +322,17 @@ go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0=
go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE=
go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
go.uber.org/automaxprocs v1.4.0 h1:CpDZl6aOlLhReez+8S3eEotD7Jx0Os++lemPlMULQP0=
go.uber.org/automaxprocs v1.4.0/go.mod h1:/mTEdr7LvHhs0v7mjdxDreTz1OG5zdZGqgOnhWiR/+Q=
go.uber.org/automaxprocs v1.5.3 h1:kWazyxZUrS3Gs4qUpbwo5kEIMGe/DAvi5Z4tl2NW4j8=
go.uber.org/automaxprocs v1.5.3/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0=
go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk=
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ=
go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60=
go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg=
go.uber.org/zap v1.25.0 h1:4Hvk6GtkucQ790dqmj7l1eEnRdKm3k3ZUrUMS2d5+5c=
go.uber.org/zap v1.25.0/go.mod h1:JIAUzQIH94IC4fOJQm7gMmBJP5k7wQfdcnYdPoEXJYk=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
Expand Down Expand Up @@ -560,8 +560,8 @@ google.golang.org/api v0.25.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M
google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM=
google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc=
google.golang.org/api v0.136.0 h1:e/6enzUE1s4tGPa6Q3ZYShKTtvRc+1Jq0rrafhppmOs=
google.golang.org/api v0.136.0/go.mod h1:XtJfF+V2zgUxelOn5Zs3kECtluMxneJG8ZxUTlLNTPA=
google.golang.org/api v0.138.0 h1:K/tVp05MxNVbHShRw9m7e9VJGdagNeTdMzqPH7AUqr0=
google.golang.org/api v0.138.0/go.mod h1:4xyob8CxC+0GChNBvEUAk8VBKNvYOTWM9T3v3UfRxuY=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
Expand Down Expand Up @@ -687,12 +687,12 @@ k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+O
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4=
k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2 h1:GfD9OzL11kvZN5iArC6oTS7RTj7oJOIfnislxYlqTj8=
k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
knative.dev/hack v0.0.0-20230815012940-044c02b7a447 h1:Lr4O/WEyZHuUBFbqATYdQlfLXvhPUCluF4zlgRi59T4=
knative.dev/hack v0.0.0-20230815012940-044c02b7a447/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q=
knative.dev/hack v0.0.0-20230818155117-9cc05a31e8c0 h1:n9YEGYuoj31pAkhGlNL+xTQAeXKYTLeMmIZLWA9fAeo=
knative.dev/hack v0.0.0-20230818155117-9cc05a31e8c0/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q=
knative.dev/networking v0.0.0-20230817140742-4bfcc9fb6012 h1:eaeZPgJzsJMnJaekbG8TYAfF/PUX8Xmdb8Oqnb+QO1k=
knative.dev/networking v0.0.0-20230817140742-4bfcc9fb6012/go.mod h1:iGxfnvUJ3gGqtKnoOXhLzNCZeGxVnH4xdClYuh5vB4o=
knative.dev/pkg v0.0.0-20230815132840-4f651e092853 h1:OyAYpXLa/jQWClFxRegCccGySyX2/1BVRtKaAWRE/xM=
knative.dev/pkg v0.0.0-20230815132840-4f651e092853/go.mod h1:Y5Tis5nMoapB9iTZywW20Qnv/7LBahrtHz9Sm6+l3LE=
knative.dev/pkg v0.0.0-20230821102121-81e4ee140363 h1:TI2hMwTM5Bl+yaWu1gN5bXAHSvc+FtH9cqm3NzmDBtY=
knative.dev/pkg v0.0.0-20230821102121-81e4ee140363/go.mod h1:dA3TdhFTRm4KmmpvfknpGV43SbGNFkLHySjC8/+NczM=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
Expand Down
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
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func New2Q(size int) (*TwoQueueCache, error) {

// New2QParams creates a new TwoQueueCache using the provided
// parameter values.
func New2QParams(size int, recentRatio float64, ghostRatio float64) (*TwoQueueCache, error) {
func New2QParams(size int, recentRatio, ghostRatio float64) (*TwoQueueCache, error) {
if size <= 0 {
return nil, fmt.Errorf("invalid size")
}
Expand Down Expand Up @@ -138,7 +138,6 @@ func (c *TwoQueueCache) Add(key, value interface{}) {
// Add to the recently seen list
c.ensureSpace(false)
c.recent.Add(key, value)
return
}

// ensureSpace is used to ensure we have space in the cache
Expand Down
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
Expand Down
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.
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ func (c *ARCCache) Add(key, value interface{}) {

// Add to the recently seen list
c.t1.Add(key, value)
return
}

// replace is used to adaptively evict from either T1 or T2
Expand Down
Loading

0 comments on commit c8e5c1f

Please sign in to comment.