diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7a31b37..2af30bf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,55 +2,32 @@ name: Build and Test on: [push, pull_request] permissions: contents: read + jobs: - build-go: + build: name: Go CI runs-on: ubuntu-latest strategy: matrix: - go: ['1.20', '1.21'] + go: ["1.22", "1.23"] steps: - - uses: awalsh128/cache-apt-pkgs-action@1850ee53f6e706525805321a3f2f863dcf73c962 #v1.3.0 - with: - packages: git-restore-mtime libgtk-3-dev libwebkit2gtk-4.0-dev - version: 1.0 - + - name: Check out source + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - name: Set up Go - uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe #v4.1.0 + uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version: ${{ matrix.go }} - - - name: Check out source - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0 - with: - fetch-depth: 0 - # Restore original file modification times for test cache reasons - - name: restore timestamps - run: git restore-mtime - - name: Install Linters - run: "curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.54.2" - - name: Use test and module cache - uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 #v3.3.2 + - name: Use lint cache + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 with: path: | - ~/.cache/go-build - ~/go/pkg/mod - key: go-test-${{ matrix.go }}-${{ github.sha }} - restore-keys: go-test-${{ matrix.go }} - + ~/.cache/golangci-lint + key: go-lint-${{ matrix.go }}-${{ hashFiles('./go.sum') }} + restore-keys: go-lint-${{ matrix.go }} + - name: Install Linters + run: "go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.60.1" + - name: Build + run: go build ./... - name: Test - env: - GO111MODULE: "on" run: | - ./run_tests.sh - - lint-docs: - name: Lint Markdown - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0 - - uses: DavidAnson/markdownlint-cli2-action@3aaa38e446fbd2c288af4291aa0f55d64651050f #v12.0.0 - continue-on-error: true - with: - globs: | - *.md + sh ./run_tests.sh diff --git a/.golangci.yml b/.golangci.yml index 88fda64..30f8926 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -2,7 +2,7 @@ run: deadline: 10m output: - format: github-actions,colored-line-number + formats: colored-line-number linters: disable-all: true @@ -10,7 +10,7 @@ linters: - asciicheck - bidichk - durationcheck - - exportloopref + - copyloopvar - gofmt - goimports - gosimple diff --git a/cgo/addresses.go b/cgo/addresses.go index 5c03531..985ff5e 100644 --- a/cgo/addresses.go +++ b/cgo/addresses.go @@ -5,6 +5,7 @@ import ( "encoding/base64" "encoding/json" + dcrwallet "decred.org/dcrwallet/v4/wallet" "decred.org/dcrwallet/v4/wallet/udb" "github.com/decred/dcrd/txscript/v4/stdaddr" ) @@ -27,7 +28,7 @@ func currentReceiveAddress(cName *C.char) *C.char { return errCResponse("w.CurrentAddress error: %v", err) } - return successCResponse(addr.String()) + return successCResponse("%s", addr) } //export newExternalAddress @@ -55,7 +56,7 @@ func newExternalAddress(cName *C.char) *C.char { return errCResponse("w.CurrentAddress error: %v", err) } - return successCResponse(addr.String()) + return successCResponse("%s", addr) } //export signMessage @@ -81,7 +82,32 @@ func signMessage(cName, cMessage, cAddress, cPassword *C.char) *C.char { sEnc := base64.StdEncoding.EncodeToString(sig) - return successCResponse(sEnc) + return successCResponse("%s", sEnc) +} + +//export verifyMessage +func verifyMessage(cName, cMessage, cAddress, cSig *C.char) *C.char { + w, ok := loadedWallet(cName) + if !ok { + return errCResponse("wallet with name %q is not loaded", goString(cName)) + } + + addr, err := stdaddr.DecodeAddress(goString(cAddress), w.MainWallet().ChainParams()) + if err != nil { + return errCResponse("unable to decode address: %v", err) + } + + sig, err := base64.StdEncoding.DecodeString(goString(cSig)) + if err != nil { + return errCResponse("unable to decode signature: %v", err) + } + + ok, err = dcrwallet.VerifyMessage(goString(cMessage), addr, sig, w.MainWallet().ChainParams()) + if err != nil { + return errCResponse("unable to verify message: %v", err) + } + + return successCResponse("%v", ok) } //export addresses @@ -111,7 +137,7 @@ func addresses(cName *C.char) *C.char { return errCResponse("unable to marshal addresses: %v", err) } - return successCResponse(string(b)) + return successCResponse("%s", b) } //export defaultPubkey @@ -126,5 +152,5 @@ func defaultPubkey(cName *C.char) *C.char { return errCResponse("unable to get default pubkey: %v", err) } - return successCResponse(pubkey) + return successCResponse("%s", pubkey) } diff --git a/cgo/sync.go b/cgo/sync.go index 5a6b273..f421ce8 100644 --- a/cgo/sync.go +++ b/cgo/sync.go @@ -122,7 +122,7 @@ func syncWallet(cName, cPeers *C.char) *C.char { }, } if err := w.StartSync(w.ctx, ntfns, peers...); err != nil { - return errCResponse(err.Error()) + return errCResponse("%v", err) } return successCResponse("sync started") } @@ -168,7 +168,7 @@ func syncWalletStatus(cName *C.char) *C.char { if err != nil { return errCResponse("unable to marshal sync status result: %v", err) } - return successCResponse(string(b)) + return successCResponse("%s", b) } //export rescanFromHeight @@ -255,5 +255,5 @@ func birthState(cName *C.char) *C.char { if err != nil { return errCResponse("unable to marshal birth state result: %v", err) } - return successCResponse(string(b)) + return successCResponse("%s", b) } diff --git a/cgo/transactions.go b/cgo/transactions.go index 07ac053..0063974 100644 --- a/cgo/transactions.go +++ b/cgo/transactions.go @@ -4,7 +4,6 @@ import "C" import ( "encoding/hex" "encoding/json" - "fmt" "math" "strconv" @@ -73,7 +72,7 @@ func createSignedTransaction(cName, cCreateSignedTxJSONReq *C.char) *C.char { if err != nil { return errCResponse("unable to marshal sign send transaction result: %v", err) } - return successCResponse(string(b)) + return successCResponse("%v", b) } //export sendRawTransaction @@ -86,7 +85,7 @@ func sendRawTransaction(cName, cTxHex *C.char) *C.char { if err != nil { return errCResponse("unable to sign send transaction: %v", err) } - return successCResponse(txHash.String()) + return successCResponse("%s", txHash) } //export listUnspents @@ -126,7 +125,7 @@ func listUnspents(cName *C.char) *C.char { if err != nil { return errCResponse("unable to marshal list unspents result: %v", err) } - return successCResponse(string(b)) + return successCResponse("%s", b) } //export estimateFee @@ -143,7 +142,7 @@ func estimateFee(cName, cNBlocks *C.char) *C.char { if err != nil { return errCResponse("unable to get fee from oracle: %v", err) } - return successCResponse(fmt.Sprintf("%d", (uint64(txFee * 1e8)))) + return successCResponse("%d", uint64(txFee*1e8)) } //export listTransactions @@ -182,7 +181,7 @@ func listTransactions(cName, cFrom, cCount *C.char) *C.char { if err != nil { return errCResponse("unable to marshal list transactions result: %v", err) } - return successCResponse(string(b)) + return successCResponse("%s", b) } //export bestBlock @@ -200,5 +199,5 @@ func bestBlock(cName *C.char) *C.char { if err != nil { return errCResponse("unable to marshal best block result: %v", err) } - return successCResponse(string(b)) + return successCResponse("%s", b) } diff --git a/cgo/walletloader.go b/cgo/walletloader.go index cf449a0..3d637d1 100644 --- a/cgo/walletloader.go +++ b/cgo/walletloader.go @@ -4,7 +4,6 @@ import "C" import ( "context" "encoding/json" - "fmt" "sync" "decred.org/dcrdex/client/mnemonic" @@ -44,7 +43,7 @@ func createWallet(cName, cDataDir, cNet, cPass, cMnemonic *C.char) *C.char { network, err := asset.NetFromString(goString(cNet)) if err != nil { - return errCResponse(err.Error()) + return errCResponse("%v", err) } logger := logBackend.Logger("[" + name + "]") @@ -76,7 +75,7 @@ func createWallet(cName, cDataDir, cNet, cPass, cMnemonic *C.char) *C.char { w, err := dcr.CreateWallet(walletCtx, params, recoveryConfig) if err != nil { cancel() - return errCResponse(err.Error()) + return errCResponse("%v", err) } wallets[name] = &wallet{ @@ -103,7 +102,7 @@ func createWatchOnlyWallet(cName, cDataDir, cNet, cPub *C.char) *C.char { network, err := asset.NetFromString(goString(cNet)) if err != nil { - return errCResponse(err.Error()) + return errCResponse("%v", err) } logger := logBackend.Logger("[" + name + "]") @@ -122,7 +121,7 @@ func createWatchOnlyWallet(cName, cDataDir, cNet, cPub *C.char) *C.char { w, err := dcr.CreateWatchOnlyWallet(walletCtx, goString(cPub), params) if err != nil { cancel() - return errCResponse(err.Error()) + return errCResponse("%v", err) } wallets[name] = &wallet{ @@ -149,7 +148,7 @@ func loadWallet(cName, cDataDir, cNet *C.char) *C.char { network, err := asset.NetFromString(goString(cNet)) if err != nil { - return errCResponse(err.Error()) + return errCResponse("%v", err) } logger := logBackend.Logger("[" + name + "]") @@ -166,12 +165,12 @@ func loadWallet(cName, cDataDir, cNet *C.char) *C.char { w, err := dcr.LoadWallet(walletCtx, params) if err != nil { cancel() - return errCResponse(err.Error()) + return errCResponse("%v", err) } if err = w.OpenWallet(walletCtx); err != nil { cancel() - return errCResponse(err.Error()) + return errCResponse("%v", err) } wallets[name] = &wallet{ @@ -180,7 +179,7 @@ func loadWallet(cName, cDataDir, cNet *C.char) *C.char { ctx: walletCtx, cancelCtx: cancel, } - return successCResponse(fmt.Sprintf("wallet %q loaded", name)) + return successCResponse("wallet %q loaded", name) } //export walletSeed @@ -195,7 +194,7 @@ func walletSeed(cName, cPass *C.char) *C.char { return errCResponse("w.DecryptSeed error: %v", err) } - return successCResponse(seed) + return successCResponse("%s", seed) } //export walletBalance @@ -226,7 +225,7 @@ func walletBalance(cName *C.char) *C.char { return errCResponse("marshal balMap error: %v", err) } - return successCResponse(string(balJson)) + return successCResponse("%s", balJson) } //export closeWallet diff --git a/go.mod b/go.mod index 2c13f45..b371fa7 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,7 @@ module github.com/decred/libwallet require ( decred.org/dcrdex v0.0.0-20240415203145-79c4689fd164 - decred.org/dcrwallet/v4 v4.1.2 + decred.org/dcrwallet/v4 v4.1.3 github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f github.com/decred/dcrd/addrmgr/v2 v2.0.4 github.com/decred/dcrd/chaincfg/chainhash v1.0.4 @@ -15,7 +15,7 @@ require ( github.com/decred/slog v1.2.0 github.com/jrick/logrotate v1.0.0 github.com/kevinburke/nacl v0.0.0-20210405173606-cd9060f5f776 - golang.org/x/crypto v0.24.0 + golang.org/x/crypto v0.26.0 ) require ( @@ -36,19 +36,19 @@ require ( github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect github.com/decred/dcrd/dcrjson/v4 v4.1.0 // indirect github.com/decred/dcrd/gcs/v4 v4.1.0 // indirect - github.com/decred/dcrd/mixing v0.4.0 // indirect + github.com/decred/dcrd/mixing v0.4.1 // indirect github.com/decred/dcrd/rpc/jsonrpc/types/v4 v4.3.0 // indirect github.com/decred/go-socks v1.1.0 // indirect github.com/gorilla/websocket v1.5.1 // indirect github.com/jrick/bitset v1.0.0 // indirect github.com/jrick/wsrpc/v2 v2.3.5 // indirect - github.com/klauspost/cpuid/v2 v2.2.5 // indirect + github.com/klauspost/cpuid/v2 v2.2.8 // indirect github.com/stretchr/testify v1.8.2 // indirect go.etcd.io/bbolt v1.3.8 // indirect - golang.org/x/net v0.25.0 // indirect - golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.21.0 // indirect + golang.org/x/net v0.28.0 // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/sys v0.23.0 // indirect lukechampine.com/blake3 v1.3.0 // indirect ) -go 1.19 +go 1.22 diff --git a/go.sum b/go.sum index 1f94bc8..22848c4 100644 --- a/go.sum +++ b/go.sum @@ -2,8 +2,8 @@ decred.org/cspp/v2 v2.2.0 h1:VSOUC1w0Wo+QOGS0r1XO6TLnO16X67KuvpDmRRYyr08= decred.org/cspp/v2 v2.2.0/go.mod h1:9nO3bfvCheOPIFZw5f6sRQ42CjBFB5RKSaJ9Iq6G4MA= decred.org/dcrdex v0.0.0-20240415203145-79c4689fd164 h1:ImD+Zui9lnZhVYacX0x9ki1M95hTYxwASl2PvVoAc2M= decred.org/dcrdex v0.0.0-20240415203145-79c4689fd164/go.mod h1:rvIXDCS3B3gbu8b0tKDvNU664nC+/zVl3ivs6AeA2V8= -decred.org/dcrwallet/v4 v4.1.2 h1:NESPkLLpLXwrsWRmeDSLM/O5NaSMFSyjQrG+9m0iuzk= -decred.org/dcrwallet/v4 v4.1.2/go.mod h1:Ivu6THxbdMLGxKTa/eJT7vDr2awmKok7gEh82oCxs/s= +decred.org/dcrwallet/v4 v4.1.3 h1:XKxDbvPAHXfLunYNbCIEh2TYCwZ039hvUJCcTpfBAMg= +decred.org/dcrwallet/v4 v4.1.3/go.mod h1:hqAijllSbuhT4dZofpufi/08kGDXVUJUnPNtmqnJq4A= github.com/agl/ed25519 v0.0.0-20170116200512-5312a6153412 h1:w1UutsfOrms1J05zt7ISrnJIXKzwaspym5BTKGx93EI= github.com/agl/ed25519 v0.0.0-20170116200512-5312a6153412/go.mod h1:WPjqKcmVOxf0XSf3YxCJs6N6AOSrOx3obionmG7T0y0= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f h1:bAs4lUbRJpnnkd9VhRV3jjAVU7DJVjMaK+IsvSeZvFo= @@ -24,6 +24,7 @@ github.com/decred/dcrd/blockchain/stake/v5 v5.0.1/go.mod h1:y1tMD1TssTlPmKDYbSrF github.com/decred/dcrd/blockchain/standalone/v2 v2.2.1 h1:zeI9CHkLM9be4QOBmIAtoPfs6NCgJM1lpmRUYE61I8o= github.com/decred/dcrd/blockchain/standalone/v2 v2.2.1/go.mod h1:yXZz/EgWdGw5nqMEvyKj/iXZ9I2VSyO95xKj6mRUMIM= github.com/decred/dcrd/blockchain/v5 v5.0.1 h1:IGr8rJsgBVKDBI8STzeuGF6Mej0xbIX4gVVBA9yEMRU= +github.com/decred/dcrd/blockchain/v5 v5.0.1/go.mod h1:LtSV1+u8aBQzlExAQcl4HIJ6Bfi5f6Rvws/9euH4mDA= github.com/decred/dcrd/chaincfg/chainhash v1.0.4 h1:zRCv6tdncLfLTKYqu7hrXvs7hW+8FO/NvwoFvGsrluU= github.com/decred/dcrd/chaincfg/chainhash v1.0.4/go.mod h1:hA86XxlBWwHivMvxzXTSD0ZCG/LoYsFdWnCekkTMCqY= github.com/decred/dcrd/chaincfg/v3 v3.2.1 h1:x9zKJaU24WAKbxAR1UyFKHlM3oJgP0H9LodokM4X5lM= @@ -54,8 +55,8 @@ github.com/decred/dcrd/gcs/v4 v4.1.0 h1:tpW7JW53yJZlgNwl/n2NL1b8NxHaIPRUyNuLMkB/ github.com/decred/dcrd/gcs/v4 v4.1.0/go.mod h1:nPTbGM/I3Ihe5KFvUmxZEqQP/jDZQjQ63+WEi/f4lqU= github.com/decred/dcrd/hdkeychain/v3 v3.1.2 h1:x25WuuE7zM/20EynuVMyOhL0K8BwGBBsexGq8xTiHFA= github.com/decred/dcrd/hdkeychain/v3 v3.1.2/go.mod h1:FnNJmZ7jqUDeAo6/c/xkQi5cuxh3EWtJeMmW6/Z8lcc= -github.com/decred/dcrd/mixing v0.4.0 h1:XblHAND4Vt5owVUvjPorDg30eWT53DpCZs6VF7U1t6U= -github.com/decred/dcrd/mixing v0.4.0/go.mod h1:ySvVwTZyVz5YvevA6YjPrB6pJEwTm7IkHohTfaiHh2c= +github.com/decred/dcrd/mixing v0.4.1 h1:W8ZCzhmNyzG1xjJMA3L6FOElmp98Ttnk3dDUxD6irAE= +github.com/decred/dcrd/mixing v0.4.1/go.mod h1:ySvVwTZyVz5YvevA6YjPrB6pJEwTm7IkHohTfaiHh2c= github.com/decred/dcrd/rpc/jsonrpc/types/v4 v4.3.0 h1:l0DnCcILTNrpy8APF3FLN312ChpkQaAuW30aC/RgBaw= github.com/decred/dcrd/rpc/jsonrpc/types/v4 v4.3.0/go.mod h1:j+kkRPXPJB5S9VFOsx8SQLcU7PTFkPKRc1aCHN4ENzA= github.com/decred/dcrd/txscript/v4 v4.1.1 h1:R4M2+jMujgQA91899SkL0cW66d6DC76Gx+1W1oEHjc0= @@ -67,6 +68,7 @@ github.com/decred/go-socks v1.1.0/go.mod h1:sDhHqkZH0X4JjSa02oYOGhcGHYp12FsY1jQ/ github.com/decred/slog v1.2.0 h1:soHAxV52B54Di3WtKLfPum9OFfWqwtf/ygf9njdfnPM= github.com/decred/slog v1.2.0/go.mod h1:kVXlGnt6DHy2fV5OjSeuvCJ0OmlmTF6LFpEPMu/fOY0= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= github.com/jrick/bitset v1.0.0 h1:Ws0PXV3PwXqWK2n7Vz6idCdrV/9OrBXgHEJi27ZB9Dw= @@ -77,8 +79,8 @@ github.com/jrick/wsrpc/v2 v2.3.5 h1:CwdycaR/df09iGkPMXs1FxqAHMCQbdAiTGoHfOrtuds= github.com/jrick/wsrpc/v2 v2.3.5/go.mod h1:7oBeDM/xMF6Yqy4GDAjpppuOf1hm6lWsaG3EaMrm+aA= github.com/kevinburke/nacl v0.0.0-20210405173606-cd9060f5f776 h1:W8T7zJRO9imecUZySwPkuXHosjp2MloqAY1eSAEEOIo= github.com/kevinburke/nacl v0.0.0-20210405173606-cd9060f5f776/go.mod h1:VUp2yfq+wAk8hMl3NNN34fXjzUD9xMpGvUL8eSJz9Ns= -github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= -github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= +github.com/klauspost/cpuid/v2 v2.2.8 h1:+StwCXwm9PdpiEkPyzBXIy+M9KUb4ODm0Zarf1kS5BM= +github.com/klauspost/cpuid/v2 v2.2.8/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -89,17 +91,18 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= +github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= -golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= -golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= -golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= -golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= +golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= +golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= +golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/run_tests.sh b/run_tests.sh index f63b0cc..837cbd4 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -8,7 +8,7 @@ echo "Go version: $GV" # Run `go mod tidy` and fail if the git status of go.mod and/or # go.sum changes. Only do this for the latest Go version. -if [[ "$GV" =~ ^1.22 ]]; then +if [[ "$GV" =~ ^1.23 ]]; then MOD_STATUS=$(git status --porcelain go.mod go.sum) go mod tidy UPDATED_MOD_STATUS=$(git status --porcelain go.mod go.sum)