this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Update Go and golangci-lint versions (#49)

The minimum Go version for the package is now Go 1.21. This is because a
future change will use the 'slices' package in test code. Note that non-test
code in the package should still be compatible with older versions of Go.

As part of this, also update the golangci-lint version to one that works
with Go 1.21, which required replacing some deprecated linters.

authored by

Billy Keyes and committed by
GitHub
9e0997ef 0a4e55f9

+31 -11
+6 -6
.github/workflows/go.yml
··· 9 9 name: Verify 10 10 runs-on: ubuntu-latest 11 11 steps: 12 - - name: Set up Go 1.19 13 - uses: actions/setup-go@v3 12 + - name: Set up Go 1.21 13 + uses: actions/setup-go@v5 14 14 with: 15 - go-version: 1.19 15 + go-version: 1.21 16 16 17 17 - name: Check out code into the Go module directory 18 - uses: actions/checkout@v2 18 + uses: actions/checkout@v4 19 19 20 20 - name: Lint 21 - uses: golangci/golangci-lint-action@v3 21 + uses: golangci/golangci-lint-action@v6 22 22 with: 23 - version: v1.49 23 + version: v1.59 24 24 25 25 - name: Test 26 26 run: go test -v ./...
+24 -4
.golangci.yml
··· 4 4 linters: 5 5 disable-all: true 6 6 enable: 7 - - deadcode 8 7 - errcheck 9 8 - gofmt 10 9 - goimports 11 - - golint 12 10 - govet 13 11 - ineffassign 14 12 - misspell 13 + - revive 15 14 - typecheck 16 15 - unconvert 17 - - varcheck 16 + - unused 18 17 19 18 issues: 20 19 exclude-use-default: false 21 20 22 - linter-settings: 21 + linters-settings: 23 22 goimports: 24 23 local-prefixes: github.com/bluekeyes/go-gitdiff 24 + revive: 25 + rules: 26 + # enable all rules from golint 27 + - name: context-keys-type 28 + - name: time-naming 29 + - name: var-declaration 30 + - name: unexported-return 31 + - name: errorf 32 + - name: blank-imports 33 + - name: context-as-argument 34 + - name: dot-imports 35 + - name: error-return 36 + - name: error-strings 37 + - name: error-naming 38 + - name: exported 39 + - name: increment-decrement 40 + - name: var-naming 41 + - name: package-comments 42 + - name: range 43 + - name: receiver-naming 44 + - name: indent-error-flow
+1 -1
go.mod
··· 1 1 module github.com/bluekeyes/go-gitdiff 2 2 3 - go 1.13 3 + go 1.21