Skip to content

Commit

Permalink
chore: update dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
mythrnr committed Nov 28, 2024
1 parent 7093577 commit f9c9ba8
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 18 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/check-code.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:

- uses: "actions/setup-go@v5"
with:
go-version: "1.22"
go-version: "1.23"

- name: "Write go.list file"
run: "go list -buildvcs=false -deps -json ./... > go.list"
Expand All @@ -59,6 +59,7 @@ jobs:
- "1.20"
- "1.21"
- "1.22"
- "1.23"
steps:
- uses: "actions/checkout@v4"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scan-vulnerabilities.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

- uses: "actions/setup-go@v5"
with:
go-version: "1.22"
go-version: "1.23"

- name: "Write go.list file"
run: "go list -buildvcs=false -deps -json ./... > go.list"
Expand Down
5 changes: 2 additions & 3 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# see: https://golangci-lint.run/usage/configuration/
run:
go: "1.20"
go: "1.23"

output:
sort-results: true
Expand Down Expand Up @@ -53,8 +53,7 @@ linters:
- "varnamelen"
- "wrapcheck"
# ---- deprecated ---- #
- "execinquery"
- "gomnd"
- "exportloopref"
# -------------------- #
enable-all: true
fast: false
Expand Down
1 change: 1 addition & 0 deletions .vscode/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"dupl",
"execinquery",
"exhaustruct",
"exportloopref",
"funlen",
"gocognit",
"gocyclo",
Expand Down
4 changes: 0 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@
"editor.formatOnSave": false,
"files.trimTrailingWhitespace": false
},
"go.autocompleteUnimportedPackages": true,
"go.formatTool": "goimports",
"go.inferGopath": false,
"go.languageServerExperimentalFeatures": {
"diagnostics": true
},
"go.lintOnSave": "workspace",
"go.lintTool": "golangci-lint",
"go.lintFlags": [
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ spell-check:

.PHONY: release
release:
if [ "$(tag)" = "" ]; then \
echo "tag name is required."; \
if [ "$(version)" = "" ]; then \
echo "version is required."; \
exit 1; \
fi \
&& gh release create $(tag) --generate-notes --target master
&& gh release create $(version) --generate-notes --target master

.PHONY: test
test:
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module github.com/mythrnr/paypayopa-sdk-go

go 1.20
go 1.23

require (
github.com/golang-jwt/jwt/v5 v5.2.1
github.com/stretchr/testify v1.9.0
github.com/stretchr/testify v1.10.0
)

require (
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
Expand Down
2 changes: 1 addition & 1 deletion internal/nonce.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func nonce(n uint) string {
seed := rand.New(rand.NewSource(time.Now().UnixNano()))
b := make([]byte, 0, n)

for i := uint(0); i < n; i++ {
for range n {
b = append(b, charset[seed.Intn(len(charset))])
}

Expand Down
2 changes: 1 addition & 1 deletion internal/signer_inner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func Test_Signer(t *testing.T) {

assert.Equal(t, "API_KEY", a.apiKey)
assert.Equal(t, "API_KEY_SECRET", a.apiKeySecret)
assert.Equal(t, []byte(`{ "test": "value" }`), a.body)
assert.JSONEq(t, `{ "test": "value" }`, string(a.body))
assert.NotZero(t, a.epoch)
assert.Equal(t, http.MethodPost, a.method)
assert.Equal(t, "/test", a.uri)
Expand Down

0 comments on commit f9c9ba8

Please sign in to comment.