+5
-5
.github/workflows/go.yml
+5
-5
.github/workflows/go.yml
···
9
9
name: Verify
10
10
runs-on: ubuntu-latest
11
11
steps:
12
-
- name: Set up Go 1.16
13
-
uses: actions/setup-go@v2
12
+
- name: Set up Go 1.19
13
+
uses: actions/setup-go@v3
14
14
with:
15
-
go-version: 1.16
15
+
go-version: 1.19
16
16
17
17
- name: Check out code into the Go module directory
18
18
uses: actions/checkout@v2
19
19
20
20
- name: Lint
21
-
uses: golangci/golangci-lint-action@v2
21
+
uses: golangci/golangci-lint-action@v3
22
22
with:
23
-
version: v1.28
23
+
version: v1.49
24
24
25
25
- name: Test
26
26
run: go test -v ./...
+3
-4
gitdiff/apply.go
+3
-4
gitdiff/apply.go
···
13
13
// Users can test if an error was caused by a conflict by using errors.Is with
14
14
// an empty Conflict:
15
15
//
16
-
// if errors.Is(err, &Conflict{}) {
17
-
// // handle conflict
18
-
// }
19
-
//
16
+
// if errors.Is(err, &Conflict{}) {
17
+
// // handle conflict
18
+
// }
20
19
type Conflict struct {
21
20
msg string
22
21
}
+3
-3
gitdiff/apply_binary.go
+3
-3
gitdiff/apply_binary.go
···
115
115
// readBinaryDeltaSize reads a variable length size from a delta-encoded binary
116
116
// fragment, returing the size and the unused data. Data is encoded as:
117
117
//
118
-
// [[1xxxxxxx]...] [0xxxxxxx]
118
+
// [[1xxxxxxx]...] [0xxxxxxx]
119
119
//
120
120
// in little-endian order, with 7 bits of the value per byte.
121
121
func readBinaryDeltaSize(d []byte) (size int64, rest []byte) {
···
134
134
// fragment, returning the amount of data written and the usused part of the
135
135
// fragment. An add operation takes the form:
136
136
//
137
-
// [0xxxxxx][[data1]...]
137
+
// [0xxxxxx][[data1]...]
138
138
//
139
139
// where the lower seven bits of the opcode is the number of data bytes
140
140
// following the opcode. See also pack-format.txt in the Git source.
···
151
151
// fragment, returing the amount of data written and the unused part of the
152
152
// fragment. A copy operation takes the form:
153
153
//
154
-
// [1xxxxxxx][offset1][offset2][offset3][offset4][size1][size2][size3]
154
+
// [1xxxxxxx][offset1][offset2][offset3][offset4][size1][size2][size3]
155
155
//
156
156
// where the lower seven bits of the opcode determine which non-zero offset and
157
157
// size bytes are present in little-endian order: if bit 0 is set, offset1 is
-1
gitdiff/apply_text.go
-1
gitdiff/apply_text.go