Skip to content

Commit

Permalink
feat(generics)!: Refactored the entire library to support generics
Browse files Browse the repository at this point in the history
- For Go 1.17 < support, continue to use `v1`
- Added better examples to the documentation closed #4
  • Loading branch information
marksalpeter authored Apr 19, 2022
1 parent d66613e commit c6d79ab
Show file tree
Hide file tree
Showing 33 changed files with 837 additions and 780 deletions.
50 changes: 25 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: 1.18

- name: Lint
if: always()
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v3
with:
version: v1.29
version: v1.45

test:
runs-on: ubuntu-latest
Expand All @@ -30,7 +30,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: 1.18

- name: Test
run: go test -coverprofile=coverage.txt -json ./... > test.json
Expand All @@ -57,33 +57,33 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: 1.18

- name: Build
run: go build -v ./...

docs:
needs: build
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Update readme according to Go doc
uses: posener/goreadme@e713475bae0c17d5083f4378c5e53d6c66d74c74
with:
email: '[email protected]'
badge-codecov: true
badge-godoc: true
badge-github: "ci.yml"
badge-goreportcard: true
badge-travisci: false
commit-message: 'improvement(docs): updated docs'
types: true
functions: true
github-token: '${{ secrets.GITHUB_TOKEN }}'
# docs:
# needs: build
# runs-on: ubuntu-latest
# steps:
# - name: Check out repository
# uses: actions/checkout@v2
# - name: Update readme according to Go doc
# uses: posener/goreadme
# with:
# email: '[email protected]'
# badge-codecov: true
# badge-godoc: true
# badge-github: "ci.yml"
# badge-goreportcard: true
# badge-travisci: false
# commit-message: 'improvement(docs): updated docs'
# types: true
# functions: true
# github-token: '${{ secrets.GITHUB_TOKEN }}'

version:
needs: docs
# needs: docs
if: github.ref == 'refs/heads/main' # only version on push to master
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ linters:
disable-all: true
enable:
- gofmt
- golint
- revive
- govet
- misspell
- deadcode
Expand Down
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
phony: readme lint

readme: #generates the README.md file
@goreadme -functions -badge-godoc -badge-github=ci.yaml -badge-goreportcard -credit=false -skip-sub-packages > README.md

lint: #runs the go linter
@go install github.com/golangci/golangci-lint/cmd/[email protected]
@golangci-lint run
Loading

0 comments on commit c6d79ab

Please sign in to comment.