Skip to content

Commit a1dfa0e

Browse files
committed
build: update go version
1 parent c543ef5 commit a1dfa0e

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ jobs:
77
runs-on: ubuntu-latest
88
strategy:
99
matrix:
10-
go: [1.11, 1.12, 1.13, 1.14, 1.15, 1.16, 1.17]
10+
go: ['1.18', '1.19', '1.20']
1111
steps:
1212
- name: Set up Go
13-
uses: actions/setup-go@v2
13+
uses: actions/setup-go@v4
1414
with:
1515
go-version: ${{ matrix.go }}
1616

@@ -24,7 +24,7 @@ jobs:
2424
run: |
2525
go test -race -covermode atomic -coverprofile=covprofile ./...
2626
- name: Install goveralls
27-
run: go get github.com/mattn/goveralls
27+
run: go install github.com/mattn/goveralls@latest
2828
- name: Send coverage
2929
env:
3030
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}

cbc.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ func CBCDecrypt(block cipher.Block, src, iv []byte, padding string) ([]byte, err
4242
}
4343

4444
// cbcIVPending auto pad length to block size
45-
func cbcIVPending(iv []byte, blockSize int)[]byte {
45+
func cbcIVPending(iv []byte, blockSize int) []byte {
4646
k := len(iv)
47-
if k < blockSize{
48-
return append(iv, bytes.Repeat([]byte{0}, blockSize - k)...)
49-
}else if k > blockSize{
50-
return iv[0: blockSize]
47+
if k < blockSize {
48+
return append(iv, bytes.Repeat([]byte{0}, blockSize-k)...)
49+
} else if k > blockSize {
50+
return iv[0:blockSize]
5151
}
5252

5353
return iv
54-
}
54+
}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module github.com/forgoer/openssl
22

3-
go 1.12
3+
go 1.13
44

55
require github.com/stretchr/testify v1.4.0

0 commit comments

Comments
 (0)