-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v2 had most of the required functions, so this change adds missing ones to satisfy the simplelru interface. To do that, RemoveOldest started returning parameters, unlike being void as before. Also, GetExpiration is added.
- Loading branch information
Showing
10 changed files
with
918 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: build-v3 | ||
|
||
on: | ||
push: | ||
branches: | ||
tags: | ||
paths: | ||
- ".github/workflows/ci-v3.yml" | ||
- "v3/**" | ||
pull_request: | ||
paths: | ||
- ".github/workflows/ci-v3.yml" | ||
- "v3/**" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: set up go | ||
uses: actions/setup-go@5 | ||
with: | ||
go-version: "1.20" | ||
id: go | ||
|
||
- name: checkout | ||
uses: actions/checkout@4 | ||
|
||
- name: build and test | ||
run: | | ||
go test -timeout=60s -race -covermode=atomic -coverprofile=$GITHUB_WORKSPACE/profile.cov | ||
go build -race | ||
working-directory: v3 | ||
|
||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v4 | ||
with: | ||
version: latest | ||
working-directory: v3 | ||
|
||
- name: install goveralls, submit coverage | ||
run: | | ||
go install github.com/mattn/goveralls@latest | ||
goveralls -service="github" -coverprofile=$GITHUB_WORKSPACE/profile.cov | ||
env: | ||
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
working-directory: v3 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
linters-settings: | ||
govet: | ||
check-shadowing: true | ||
gocyclo: | ||
min-complexity: 15 | ||
misspell: | ||
locale: US | ||
gocritic: | ||
enabled-tags: | ||
- performance | ||
- style | ||
- experimental | ||
disabled-checks: | ||
- wrapperFunc | ||
|
||
linters: | ||
enable: | ||
- gocritic | ||
- megacheck | ||
- revive | ||
- govet | ||
- unconvert | ||
- megacheck | ||
- gas | ||
- gocyclo | ||
- dupl | ||
- misspell | ||
- unused | ||
- typecheck | ||
- ineffassign | ||
- stylecheck | ||
- gochecknoinits | ||
- exportloopref | ||
- nakedret | ||
- gosimple | ||
- prealloc | ||
fast: false | ||
disable-all: true | ||
|
||
run: | ||
output: | ||
format: tab | ||
skip-dirs: | ||
- vendor |
Oops, something went wrong.