Skip to content

Commit

Permalink
build: update go version
Browse files Browse the repository at this point in the history
  • Loading branch information
leeqvip committed May 11, 2023
1 parent c543ef5 commit a1dfa0e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go: [1.11, 1.12, 1.13, 1.14, 1.15, 1.16, 1.17]
go: ['1.18', '1.19', '1.20']
steps:
- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}

Expand All @@ -24,7 +24,7 @@ jobs:
run: |
go test -race -covermode atomic -coverprofile=covprofile ./...
- name: Install goveralls
run: go get github.com/mattn/goveralls
run: go install github.com/mattn/goveralls@latest
- name: Send coverage
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
12 changes: 6 additions & 6 deletions cbc.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ func CBCDecrypt(block cipher.Block, src, iv []byte, padding string) ([]byte, err
}

// cbcIVPending auto pad length to block size
func cbcIVPending(iv []byte, blockSize int)[]byte {
func cbcIVPending(iv []byte, blockSize int) []byte {
k := len(iv)
if k < blockSize{
return append(iv, bytes.Repeat([]byte{0}, blockSize - k)...)
}else if k > blockSize{
return iv[0: blockSize]
if k < blockSize {
return append(iv, bytes.Repeat([]byte{0}, blockSize-k)...)
} else if k > blockSize {
return iv[0:blockSize]
}

return iv
}
}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module github.com/forgoer/openssl

go 1.12
go 1.13

require github.com/stretchr/testify v1.4.0

0 comments on commit a1dfa0e

Please sign in to comment.