Skip to content

Test with Go 1.19, upgrade golangci-lint #35

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ jobs:
name: Verify
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.16
uses: actions/setup-go@v2
- name: Set up Go 1.19
uses: actions/setup-go@v3
with:
go-version: 1.16
go-version: 1.19

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Lint
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v3
with:
version: v1.28
version: v1.49

- name: Test
run: go test -v ./...
7 changes: 3 additions & 4 deletions gitdiff/apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ import (
// Users can test if an error was caused by a conflict by using errors.Is with
// an empty Conflict:
//
// if errors.Is(err, &Conflict{}) {
// // handle conflict
// }
//
// if errors.Is(err, &Conflict{}) {
// // handle conflict
// }
type Conflict struct {
msg string
}
Expand Down
6 changes: 3 additions & 3 deletions gitdiff/apply_binary.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func applyBinaryDeltaFragment(dst io.Writer, src io.ReaderAt, frag []byte) error
// readBinaryDeltaSize reads a variable length size from a delta-encoded binary
// fragment, returing the size and the unused data. Data is encoded as:
//
// [[1xxxxxxx]...] [0xxxxxxx]
// [[1xxxxxxx]...] [0xxxxxxx]
//
// in little-endian order, with 7 bits of the value per byte.
func readBinaryDeltaSize(d []byte) (size int64, rest []byte) {
Expand All @@ -134,7 +134,7 @@ func readBinaryDeltaSize(d []byte) (size int64, rest []byte) {
// fragment, returning the amount of data written and the usused part of the
// fragment. An add operation takes the form:
//
// [0xxxxxx][[data1]...]
// [0xxxxxx][[data1]...]
//
// where the lower seven bits of the opcode is the number of data bytes
// following the opcode. See also pack-format.txt in the Git source.
Expand All @@ -151,7 +151,7 @@ func applyBinaryDeltaAdd(w io.Writer, op byte, delta []byte) (n int64, rest []by
// fragment, returing the amount of data written and the unused part of the
// fragment. A copy operation takes the form:
//
// [1xxxxxxx][offset1][offset2][offset3][offset4][size1][size2][size3]
// [1xxxxxxx][offset1][offset2][offset3][offset4][size1][size2][size3]
//
// where the lower seven bits of the opcode determine which non-zero offset and
// size bytes are present in little-endian order: if bit 0 is set, offset1 is
Expand Down
1 change: 0 additions & 1 deletion gitdiff/apply_text.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
//
// By default, TextApplier operates in "strict" mode, where fragment content
// and positions must exactly match those of the source.
//
type TextApplier struct {
dst io.Writer
src io.ReaderAt
Expand Down
2 changes: 1 addition & 1 deletion gitdiff/testdata/apply/bin.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+build ignore
//go:build ignore

// bin.go is a helper CLI to manipulate binary diff data for testing purposes.
// It can decode patches generated by git using the standard parsing functions
Expand Down