diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..3a36d60 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,22 @@ +name: go-cache +on: + push: +jobs: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup Go + uses: actions/setuop-go@v2 + with: + go-version: 1.14 + + - name: Check gofmt + run: test -z "$(gofmt -s -d .)" + + - name: Run go vet + run: go vet ./... + + - name: Test + run: go test -v \ No newline at end of file diff --git a/cache.go b/cache.go index 4a63866..1504d51 100644 --- a/cache.go +++ b/cache.go @@ -1117,7 +1117,7 @@ func (c *cache) Flush() map[string]*Item { c.items = map[string]*Item{} - return m + return nil } type janitor struct {