diff --git a/go.mod b/go.mod index a71c892c26..047b845a92 100644 --- a/go.mod +++ b/go.mod @@ -6,13 +6,13 @@ require ( github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.6.0 github.com/CortexFoundation/inference v1.0.2-0.20230307032835-9197d586a4e8 github.com/CortexFoundation/statik v0.0.0-20210315012922-8bb8a7b5dc66 - github.com/CortexFoundation/torrentfs v1.0.69-0.20250403225800-b711a7505432 + github.com/CortexFoundation/torrentfs v1.0.69-0.20250413152926-abb59313c23c github.com/VictoriaMetrics/fastcache v1.12.2 github.com/arsham/figurine v1.3.0 github.com/aws/aws-sdk-go-v2 v1.36.3 - github.com/aws/aws-sdk-go-v2/config v1.29.13 - github.com/aws/aws-sdk-go-v2/credentials v1.17.66 - github.com/aws/aws-sdk-go-v2/service/route53 v1.51.0 + github.com/aws/aws-sdk-go-v2/config v1.29.14 + github.com/aws/aws-sdk-go-v2/credentials v1.17.67 + github.com/aws/aws-sdk-go-v2/service/route53 v1.51.1 github.com/cespare/cp v1.1.1 github.com/charmbracelet/bubbletea v1.3.4 github.com/cloudflare/cloudflare-go v0.115.0 @@ -24,7 +24,7 @@ require ( github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 github.com/dop251/goja v0.0.0-20250309171923-bcd7cc6bf64c github.com/ethereum/c-kzg-4844 v1.0.3 - github.com/ethereum/go-ethereum v1.15.7 + github.com/ethereum/go-ethereum v1.15.8 github.com/ethereum/go-verkle v0.2.2 github.com/ferranbt/fastssz v0.1.4 github.com/fjl/gencodec v0.1.0 @@ -68,7 +68,7 @@ require ( golang.org/x/sys v0.32.0 golang.org/x/text v0.24.0 golang.org/x/time v0.11.0 - golang.org/x/tools v0.31.0 + golang.org/x/tools v0.32.0 google.golang.org/protobuf v1.36.6 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce @@ -77,7 +77,7 @@ require ( require ( github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.1 // indirect github.com/CortexFoundation/compress v0.0.0-20240218153512-9074bdc2397c // indirect github.com/CortexFoundation/cvm-runtime v0.0.0-20221117094012-b5a251885572 // indirect github.com/CortexFoundation/merkletree v0.0.0-20240407093305-416581a62b5b // indirect @@ -100,7 +100,7 @@ require ( github.com/anacrolix/multiless v0.4.0 // indirect github.com/anacrolix/stm v0.5.0 // indirect github.com/anacrolix/sync v0.5.3 // indirect - github.com/anacrolix/torrent v1.58.2-0.20250318232932-3a656a26676c // indirect + github.com/anacrolix/torrent v1.58.2-0.20250409094824-b85facb2e9a7 // indirect github.com/anacrolix/upnp v0.1.4 // indirect github.com/anacrolix/utp v0.2.0 // indirect github.com/antlabs/stl v0.0.2 // indirect @@ -115,7 +115,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15 // indirect github.com/aws/aws-sdk-go-v2/service/sso v1.25.3 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.1 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.33.18 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.33.19 // indirect github.com/aws/smithy-go v1.22.3 // indirect github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/bahlo/generic-list-go v0.2.0 // indirect @@ -140,7 +140,7 @@ require ( github.com/consensys/bavard v0.1.30 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.6 // indirect github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a // indirect - github.com/dgraph-io/badger/v4 v4.6.1-0.20250402023427-987f17dd1330 // indirect + github.com/dgraph-io/badger/v4 v4.7.1-0.20250411021723-85389e88bf30 // indirect github.com/dgraph-io/ristretto/v2 v2.2.0 // indirect github.com/dlclark/regexp2 v1.11.5 // indirect github.com/dustin/go-humanize v1.0.1 // indirect @@ -149,7 +149,7 @@ require ( github.com/emicklei/dot v1.8.0 // indirect github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect github.com/garslo/gogen v0.0.0-20170306192744-1d203ffc1f61 // indirect - github.com/getsentry/sentry-go v0.31.1 // indirect + github.com/getsentry/sentry-go v0.32.0 // indirect github.com/go-llsqlite/adapter v0.2.0 // indirect github.com/go-llsqlite/crawshaw v0.5.5 // indirect github.com/go-logr/logr v1.4.2 // indirect @@ -192,14 +192,14 @@ require ( github.com/pion/datachannel v1.5.10 // indirect github.com/pion/dtls/v2 v2.2.12 // indirect github.com/pion/dtls/v3 v3.0.6 // indirect - github.com/pion/ice/v4 v4.0.9 // indirect + github.com/pion/ice/v4 v4.0.10 // indirect github.com/pion/interceptor v0.1.37 // indirect github.com/pion/logging v0.2.3 // indirect github.com/pion/mdns/v2 v2.0.7 // indirect github.com/pion/randutil v0.1.0 // indirect github.com/pion/rtcp v1.2.15 // indirect github.com/pion/rtp v1.8.13 // indirect - github.com/pion/sctp v1.8.37 // indirect + github.com/pion/sctp v1.8.38 // indirect github.com/pion/sdp/v3 v3.0.11 // indirect github.com/pion/srtp/v3 v3.0.4 // indirect github.com/pion/stun/v3 v3.0.0 // indirect @@ -209,8 +209,8 @@ require ( github.com/pion/webrtc/v4 v4.0.14 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.21.1 // indirect - github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/client_golang v1.22.0 // indirect + github.com/prometheus/client_model v0.6.2 // indirect github.com/prometheus/common v0.63.0 // indirect github.com/prometheus/procfs v0.16.0 // indirect github.com/protolambda/ctxlock v0.1.0 // indirect @@ -229,7 +229,7 @@ require ( github.com/tklauser/numcpus v0.10.0 // indirect github.com/ucwong/filecache v1.0.6-0.20230405163841-810d53ced4bd // indirect github.com/ucwong/go-ttlmap v1.0.2-0.20221020173635-331e7ddde2bb // indirect - github.com/ucwong/golang-kv v1.0.24-0.20250403224746-16edf10ae080 // indirect + github.com/ucwong/golang-kv v1.0.24-0.20250413092139-da21b79ba97d // indirect github.com/ucwong/shard v1.0.1-0.20240327124306-59a521744cae // indirect github.com/wlynxg/anet v0.0.5 // indirect github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect @@ -243,9 +243,9 @@ require ( go.opentelemetry.io/otel v1.35.0 // indirect go.opentelemetry.io/otel/metric v1.35.0 // indirect go.opentelemetry.io/otel/trace v1.35.0 // indirect - golang.org/x/exp v0.0.0-20250305212735-054e65f0b394 // indirect + golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 // indirect golang.org/x/mod v0.24.0 // indirect - golang.org/x/net v0.38.0 // indirect + golang.org/x/net v0.39.0 // indirect golang.org/x/term v0.31.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index 798494075e..57f372557e 100644 --- a/go.sum +++ b/go.sum @@ -39,8 +39,8 @@ github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.0 h1:Gt0j3wceWMwPmiazCa8MzMA0 github.com/Azure/azure-sdk-for-go/sdk/azcore v1.18.0/go.mod h1:Ot/6aikWnKWi4l9QB7qVSwa8iMphQNqkWALMoNT3rzM= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.2 h1:F0gBpfdPLGsw+nsgk6aqqkZS1jiixa5WwFe3fk/T3Ys= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.2/go.mod h1:SqINnQ9lVVdRlyC8cd1lCI0SdX4n2paeABd2K8ggfnE= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.0 h1:Bg8m3nq/X1DeePkAbCfb6ml6F3F0IunEhE8TMh+lY48= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.0/go.mod h1:j2chePtV91HrC22tGoRX3sGY42uF13WzmmV80/OdVAA= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.1 h1:FPKJS1T+clwv+OLGt13a8UjqeRuh0O4SJ3lUriThc+4= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.1/go.mod h1:j2chePtV91HrC22tGoRX3sGY42uF13WzmmV80/OdVAA= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.6.0 h1:PiSrjRPpkQNjrM8H0WwKMnZUdu1RGMtd/LdGKUrOo+c= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.6.0/go.mod h1:oDrbWx4ewMylP7xHivfgixbfGBT6APAwsSoHRKotnIc= github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.6.0 h1:UXT0o77lXQrikd1kgwIPQOUect7EoR/+sbP4wQKdzxM= @@ -70,8 +70,8 @@ github.com/CortexFoundation/statik v0.0.0-20210315012922-8bb8a7b5dc66/go.mod h1: github.com/CortexFoundation/torrentfs v1.0.13-0.20200623060705-ce027f43f2f8/go.mod h1:Ma+tGhPPvz4CEZHaqEJQMOEGOfHeQBiAoNd1zyc/w3Q= github.com/CortexFoundation/torrentfs v1.0.14-0.20200703071639-3fcabcabf274/go.mod h1:qnb3YlIJmuetVBtC6Lsejr0Xru+1DNmDCdTqnwy7lhk= github.com/CortexFoundation/torrentfs v1.0.20-0.20200810031954-d36d26f82fcc/go.mod h1:N5BsicP5ynjXIi/Npl/SRzlJ630n1PJV2sRj0Z0t2HA= -github.com/CortexFoundation/torrentfs v1.0.69-0.20250403225800-b711a7505432 h1:YUhMnjMJz6cUJ04HfDYl8cCKIN45SZomcEuSKJztPvA= -github.com/CortexFoundation/torrentfs v1.0.69-0.20250403225800-b711a7505432/go.mod h1:2uiIhDJ4PF/us/vHB/ONz57lmi1nF/b0vM3c6Z9pPDY= +github.com/CortexFoundation/torrentfs v1.0.69-0.20250413152926-abb59313c23c h1:lpJ1OrrVq0fAz9299pdKPZPfmqopKFO+OHpCJQ9xHbo= +github.com/CortexFoundation/torrentfs v1.0.69-0.20250413152926-abb59313c23c/go.mod h1:Lf7iaFiGPvExQiyPufsbQ8hs0XkKUunTLcp0r77/IaY= github.com/CortexFoundation/wormhole v0.0.2-0.20241128010855-a23c88842cfa h1:46VAGWxOwpoLlPNcR9etAhK0NtT215skO9Wl4i14r4o= github.com/CortexFoundation/wormhole v0.0.2-0.20241128010855-a23c88842cfa/go.mod h1:ipzmPabDgzYKUbXkGVe2gTkBEp+MsDx6pXGiuYzmP6s= github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= @@ -221,8 +221,8 @@ github.com/anacrolix/torrent v1.15.0/go.mod h1:MFc6KcbpAyfwGqOyRkdarUK9QnKA/FkVg github.com/anacrolix/torrent v1.15.1-0.20200504230043-cc5d2abe18e5/go.mod h1:QlOfgrCz5kbvhOz8M58dUwHY5SfZ9VbIvReZ0z0MdIk= github.com/anacrolix/torrent v1.15.1-0.20200619022403-dd51e99b88cc/go.mod h1:wuopQPC5+/M+zHYvhcA2vp5UCTm9rUc+VqjyBa882Q8= github.com/anacrolix/torrent v1.15.1-0.20200715061614-dd906f8fa72e/go.mod h1:XWo/fJN1oKgcjgxM+pUZpvalHfqHDs27BY5mBZjIQWo= -github.com/anacrolix/torrent v1.58.2-0.20250318232932-3a656a26676c h1:cYUxNlAThyFNobh7XwAbyPl5lytbNb1FXeeDfygk0a4= -github.com/anacrolix/torrent v1.58.2-0.20250318232932-3a656a26676c/go.mod h1:/7ZdLuHNKgtCE1gjYJCfbtG9JodBcDaF5ip5EUWRtk8= +github.com/anacrolix/torrent v1.58.2-0.20250409094824-b85facb2e9a7 h1:H25XwDJT291vQD8gzu8/bo7Jdmi+i5T2WJfpzWct8Pk= +github.com/anacrolix/torrent v1.58.2-0.20250409094824-b85facb2e9a7/go.mod h1:kV6+k/1VfMOThhOLgedSyjsRd7GyC/lTggwEHJcP4yM= github.com/anacrolix/upnp v0.1.1/go.mod h1:LXsbsp5h+WGN7YR+0A7iVXm5BL1LYryDev1zuJMWYQo= github.com/anacrolix/upnp v0.1.2-0.20200416075019-5e9378ed1425/go.mod h1:Pz94W3kl8rf+wxH3IbCa9Sq+DTJr8OSbV2Q3/y51vYs= github.com/anacrolix/upnp v0.1.4 h1:+2t2KA6QOhm/49zeNyeVwDu1ZYS9dB9wfxyVvh/wk7U= @@ -265,10 +265,10 @@ github.com/aws/aws-sdk-go v1.31.0/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/aws/aws-sdk-go-v2 v1.36.3 h1:mJoei2CxPutQVxaATCzDUjcZEjVRdpsiiXi2o38yqWM= github.com/aws/aws-sdk-go-v2 v1.36.3/go.mod h1:LLXuLpgzEbD766Z5ECcRmi8AzSwfZItDtmABVkRLGzg= -github.com/aws/aws-sdk-go-v2/config v1.29.13 h1:RgdPqWoE8nPpIekpVpDJsBckbqT4Liiaq9f35pbTh1Y= -github.com/aws/aws-sdk-go-v2/config v1.29.13/go.mod h1:NI28qs/IOUIRhsR7GQ/JdexoqRN9tDxkIrYZq0SOF44= -github.com/aws/aws-sdk-go-v2/credentials v1.17.66 h1:aKpEKaTy6n4CEJeYI1MNj97oSDLi4xro3UzQfwf5RWE= -github.com/aws/aws-sdk-go-v2/credentials v1.17.66/go.mod h1:xQ5SusDmHb/fy55wU0QqTy0yNfLqxzec59YcsRZB+rI= +github.com/aws/aws-sdk-go-v2/config v1.29.14 h1:f+eEi/2cKCg9pqKBoAIwRGzVb70MRKqWX4dg1BDcSJM= +github.com/aws/aws-sdk-go-v2/config v1.29.14/go.mod h1:wVPHWcIFv3WO89w0rE10gzf17ZYy+UVS1Geq8Iei34g= +github.com/aws/aws-sdk-go-v2/credentials v1.17.67 h1:9KxtdcIA/5xPNQyZRgUSpYOE6j9Bc4+D7nZua0KGYOM= +github.com/aws/aws-sdk-go-v2/credentials v1.17.67/go.mod h1:p3C44m+cfnbv763s52gCqrjaqyPikj9Sg47kUVaNZQQ= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30 h1:x793wxmUWVDhshP8WW2mlnXuFrO4cOd3HLBroh1paFw= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30/go.mod h1:Jpne2tDnYiFascUEs2AWHJL9Yp7A5ZVy3TNyxaAjD6M= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34 h1:ZK5jHhnrioRkUNOc+hOgQKlUL5JeC3S6JgLxtQ+Rm0Q= @@ -281,14 +281,14 @@ github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3 h1:eAh2A4b github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3/go.mod h1:0yKJC/kb8sAnmlYa6Zs3QVYqaC8ug2AbnNChv5Ox3uA= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15 h1:dM9/92u2F1JbDaGooxTq18wmmFzbJRfXfVfy96/1CXM= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15/go.mod h1:SwFBy2vjtA0vZbjjaFtfN045boopadnoVPhu4Fv66vY= -github.com/aws/aws-sdk-go-v2/service/route53 v1.51.0 h1:pK3YJIgOzYqctprqQ67kGSjeL+77r9Ue/4/gBonsGNc= -github.com/aws/aws-sdk-go-v2/service/route53 v1.51.0/go.mod h1:kGYOjvTa0Vw0qxrqrOLut1vMnui6qLxqv/SX3vYeM8Y= +github.com/aws/aws-sdk-go-v2/service/route53 v1.51.1 h1:41HrH51fydStW2Tah74zkqZlJfyx4gXeuGOdsIFuckY= +github.com/aws/aws-sdk-go-v2/service/route53 v1.51.1/go.mod h1:kGYOjvTa0Vw0qxrqrOLut1vMnui6qLxqv/SX3vYeM8Y= github.com/aws/aws-sdk-go-v2/service/sso v1.25.3 h1:1Gw+9ajCV1jogloEv1RRnvfRFia2cL6c9cuKV2Ps+G8= github.com/aws/aws-sdk-go-v2/service/sso v1.25.3/go.mod h1:qs4a9T5EMLl/Cajiw2TcbNt2UNo/Hqlyp+GiuG4CFDI= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.1 h1:hXmVKytPfTy5axZ+fYbR5d0cFmC3JvwLm5kM83luako= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.1/go.mod h1:MlYRNmYu/fGPoxBQVvBYr9nyr948aY/WLUvwBMBJubs= -github.com/aws/aws-sdk-go-v2/service/sts v1.33.18 h1:xz7WvTMfSStb9Y8NpCT82FXLNC3QasqBfuAFHY4Pk5g= -github.com/aws/aws-sdk-go-v2/service/sts v1.33.18/go.mod h1:cQnB8CUnxbMU82JvlqjKR2HBOm3fe9pWorWBza6MBJ4= +github.com/aws/aws-sdk-go-v2/service/sts v1.33.19 h1:1XuUZ8mYJw9B6lzAkXhqHlJd/XvaX32evhproijJEZY= +github.com/aws/aws-sdk-go-v2/service/sts v1.33.19/go.mod h1:cQnB8CUnxbMU82JvlqjKR2HBOm3fe9pWorWBza6MBJ4= github.com/aws/smithy-go v1.22.3 h1:Z//5NuZCSW6R4PhQ93hShNbyBbn8BWCmCVCt+Q8Io5k= github.com/aws/smithy-go v1.22.3/go.mod h1:t1ufH5HMublsJYulve2RKmHDC15xu1f26kHCp/HgceI= github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= @@ -416,8 +416,8 @@ github.com/decred/dcrd/crypto/blake256 v1.1.0 h1:zPMNGQCm0g4QTY27fOCorQW7EryeQ/U github.com/decred/dcrd/crypto/blake256 v1.1.0/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 h1:NMZiJj8QnKe1LgsbDayM4UoHwbvwDRwnI3hwNaAHRnc= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0/go.mod h1:ZXNYxsqcloTdSy/rNShjYzMhyjf0LaoftYK0p+A3h40= -github.com/dgraph-io/badger/v4 v4.6.1-0.20250402023427-987f17dd1330 h1:ePOWuxvQy+LrydOwRA9ahxtYrv6MowJHwXlbIN8D4vw= -github.com/dgraph-io/badger/v4 v4.6.1-0.20250402023427-987f17dd1330/go.mod h1:lOgiTHCdAsTrjAwtNQhLuPcgEZI3ah68m+tqXnYYJRs= +github.com/dgraph-io/badger/v4 v4.7.1-0.20250411021723-85389e88bf30 h1:eg6GT2ed6KUNeQuSOER2OmueMacPHt+fWgasGOY/HJ0= +github.com/dgraph-io/badger/v4 v4.7.1-0.20250411021723-85389e88bf30/go.mod h1:fG8zKdz39pTCsqmyrj0cKcpb3DI6Y1PXVoxLpvKsPcs= github.com/dgraph-io/ristretto/v2 v2.2.0 h1:bkY3XzJcXoMuELV8F+vS8kzNgicwQFAaGINAEJdWGOM= github.com/dgraph-io/ristretto/v2 v2.2.0/go.mod h1:RZrm63UmcBAaYWC1DotLYBmTvgkrs0+XhBd7Npn7/zI= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= @@ -464,8 +464,8 @@ github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f/go.mod h1:vw97 github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/ethereum/c-kzg-4844 v1.0.3 h1:IEnbOHwjixW2cTvKRUlAAUOeleV7nNM/umJR+qy4WDs= github.com/ethereum/c-kzg-4844 v1.0.3/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= -github.com/ethereum/go-ethereum v1.15.7 h1:vm1XXruZVnqtODBgqFaTclzP0xAvCvQIDKyFNUA1JpY= -github.com/ethereum/go-ethereum v1.15.7/go.mod h1:+S9k+jFzlyVTNcYGvqFhzN/SFhI6vA+aOY4T5tLSPL0= +github.com/ethereum/go-ethereum v1.15.8 h1:H6NilvRXFVoHiXZ3zkuTqKW5XcxjLZniV5UjxJt1GJU= +github.com/ethereum/go-ethereum v1.15.8/go.mod h1:+S9k+jFzlyVTNcYGvqFhzN/SFhI6vA+aOY4T5tLSPL0= github.com/ethereum/go-verkle v0.2.2 h1:I2W0WjnrFUIzzVPwm8ykY+7pL2d4VhlsePn4j7cnFk8= github.com/ethereum/go-verkle v0.2.2/go.mod h1:M3b90YRnzqKyyzBEWJGqj8Qff4IDeXnzFw0P9bFw3uk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= @@ -497,8 +497,8 @@ github.com/garslo/gogen v0.0.0-20170306192744-1d203ffc1f61/go.mod h1:Q0X6pkwTILD github.com/garyburd/redigo v1.6.0/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 h1:f6D9Hr8xV8uYKlyuj8XIruxlh9WjVjdh1gIicAS7ays= github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= -github.com/getsentry/sentry-go v0.31.1 h1:ELVc0h7gwyhnXHDouXkhqTFSO5oslsRDk0++eyE0KJ4= -github.com/getsentry/sentry-go v0.31.1/go.mod h1:CYNcMMz73YigoHljQRG+qPF+eMq8gG72XcGN/p71BAY= +github.com/getsentry/sentry-go v0.32.0 h1:YKs+//QmwE3DcYtfKRH8/KyOOF/I6Qnx7qYGNHCGmCY= +github.com/getsentry/sentry-go v0.32.0/go.mod h1:CYNcMMz73YigoHljQRG+qPF+eMq8gG72XcGN/p71BAY= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= @@ -987,8 +987,8 @@ github.com/pion/dtls/v3 v3.0.6 h1:7Hkd8WhAJNbRgq9RgdNh1aaWlZlGpYTzdqjy9x9sK2E= github.com/pion/dtls/v3 v3.0.6/go.mod h1:iJxNQ3Uhn1NZWOMWlLxEEHAN5yX7GyPvvKw04v9bzYU= github.com/pion/ice v0.7.13/go.mod h1:U3ERMkJgkPMlBjzMe2XxIQPl6ZrfRHyENwGCBoFrWWk= github.com/pion/ice v0.7.14/go.mod h1:/Lz6jAUhsvXed7kNJImXtvVSgjtcdGKoZAZIYb9WEm0= -github.com/pion/ice/v4 v4.0.9 h1:VKgU4MwA2LUDVLq+WBkpEHTcAb8c5iCvFMECeuPOZNk= -github.com/pion/ice/v4 v4.0.9/go.mod h1:y3M18aPhIxLlcO/4dn9X8LzLLSma84cx6emMSu14FGw= +github.com/pion/ice/v4 v4.0.10 h1:P59w1iauC/wPk9PdY8Vjl4fOFL5B+USq1+xbDcN6gT4= +github.com/pion/ice/v4 v4.0.10/go.mod h1:y3M18aPhIxLlcO/4dn9X8LzLLSma84cx6emMSu14FGw= github.com/pion/interceptor v0.1.37 h1:aRA8Zpab/wE7/c0O3fh1PqY0AJI3fCSEM5lRWJVorwI= github.com/pion/interceptor v0.1.37/go.mod h1:JzxbJ4umVTlZAf+/utHzNesY8tmRkM2lVmkS82TTj8Y= github.com/pion/logging v0.2.2/go.mod h1:k0/tDVsRCX2Mb2ZEmTqNa7CWsQPc+YYCB7Q+5pahoms= @@ -1008,8 +1008,8 @@ github.com/pion/rtp v1.4.0/go.mod h1:/l4cvcKd0D3u9JLs2xSVI95YkfXW87a3br3nqmVtSlE github.com/pion/rtp v1.8.13 h1:8uSUPpjSL4OlwZI8Ygqu7+h2p9NPFB+yAZ461Xn5sNg= github.com/pion/rtp v1.8.13/go.mod h1:8uMBJj32Pa1wwx8Fuv/AsFhn8jsgw+3rUC2PfoBZ8p4= github.com/pion/sctp v1.7.6/go.mod h1:ichkYQ5tlgCQwEwvgfdcAolqx1nHbYCxo4D7zK/K0X8= -github.com/pion/sctp v1.8.37 h1:ZDmGPtRPX9mKCiVXtMbTWybFw3z/hVKAZgU81wcOrqs= -github.com/pion/sctp v1.8.37/go.mod h1:cNiLdchXra8fHQwmIoqw0MbLLMs+f7uQ+dGMG2gWebE= +github.com/pion/sctp v1.8.38 h1:rntHxO7CyH8jeqC/bkuirl2uJ+BqTp2uxhisi5AYPRQ= +github.com/pion/sctp v1.8.38/go.mod h1:cNiLdchXra8fHQwmIoqw0MbLLMs+f7uQ+dGMG2gWebE= github.com/pion/sdp/v2 v2.3.7/go.mod h1:+ZZf35r1+zbaWYiZLfPutWfx58DAWcGb2QsS3D/s9M8= github.com/pion/sdp/v3 v3.0.11 h1:VhgVSopdsBKwhCFoyyPmT1fKMeV9nLMrEKxNOdy3IVI= github.com/pion/sdp/v3 v3.0.11/go.mod h1:88GMahN5xnScv1hIMTqLdu/cOcUkj6a9ytbncwMCq2E= @@ -1064,16 +1064,16 @@ github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3O github.com/prometheus/client_golang v1.6.0/go.mod h1:ZLOG9ck3JLRdB5MgO8f+lLTe83AXG6ro35rLTxvnIl4= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.21.1 h1:DOvXXTqVzvkIewV/CDPFdejpMCGeMcbGCQ8YOmu+Ibk= -github.com/prometheus/client_golang v1.21.1/go.mod h1:U9NM32ykUErtVBxdvD3zfi+EuFkkaBvMb09mIfe0Zgg= +github.com/prometheus/client_golang v1.22.0 h1:rb93p9lokFEsctTys46VnV1kLCDpVZ0a/Y92Vm0Zc6Q= +github.com/prometheus/client_golang v1.22.0/go.mod h1:R7ljNsLXhuQXYZYtw6GAE9AZg8Y7vEW5scdCXrWRXC0= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= -github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= +github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE= github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= @@ -1262,8 +1262,8 @@ github.com/ucwong/filecache v1.0.6-0.20230405163841-810d53ced4bd h1:gBtlvLAsgLk+ github.com/ucwong/filecache v1.0.6-0.20230405163841-810d53ced4bd/go.mod h1:ddwX+NCjMZPdpzcGh1fcEbNTUTCtKgt2hC2rqvmLKgA= github.com/ucwong/go-ttlmap v1.0.2-0.20221020173635-331e7ddde2bb h1:dVZH3AH9f7zB3VBmsjn25B7lfcAyMP4QxdFYTrfj7tg= github.com/ucwong/go-ttlmap v1.0.2-0.20221020173635-331e7ddde2bb/go.mod h1:3yswsBsVuwsOjDvFfC5Na9XSEf4HC7mj3W3g6jvSY/s= -github.com/ucwong/golang-kv v1.0.24-0.20250403224746-16edf10ae080 h1:2V+3vnDFT9KgoIBs7PyD0dmlHN7ZtuyikgxkfdsSx4c= -github.com/ucwong/golang-kv v1.0.24-0.20250403224746-16edf10ae080/go.mod h1:ijl/xxhkA4AzIKXb9RtwscocxE18fFxdX7WUx74J7gg= +github.com/ucwong/golang-kv v1.0.24-0.20250413092139-da21b79ba97d h1:6N8IrVfbdXs2k/rlWVHGUS5qhhC1hWmnmld73lUsHD4= +github.com/ucwong/golang-kv v1.0.24-0.20250413092139-da21b79ba97d/go.mod h1:lH6fDr9x8F/pMFY88m15msOUeXYsNKXTbbikccJVHDQ= github.com/ucwong/golang-set v1.8.1-0.20200419153428-d7b0b1ac2d43/go.mod h1:xu0FaiQFGbBcFZj2o7udZ5rbA8jRTsv47hkPoG5qQNM= github.com/ucwong/goleveldb v1.0.3-0.20200508074755-578cba616f37/go.mod h1:dgJUTtDxq/ne6/JzZhHzF24OL/uqILz9IWk8HmT4V2g= github.com/ucwong/goleveldb v1.0.3-0.20200618184106-f1c6bc3a428b/go.mod h1:7Sq6w7AfEZuB/a6mrlvHCSXCSkqojCMMrM3Ei12QAT0= @@ -1394,8 +1394,8 @@ golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20220428152302-39d4317da171/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE= -golang.org/x/exp v0.0.0-20250305212735-054e65f0b394 h1:nDVHiLt8aIbd/VzvPWN6kSOPE7+F/fNFDSXLVYkE/Iw= -golang.org/x/exp v0.0.0-20250305212735-054e65f0b394/go.mod h1:sIifuuw/Yco/y6yb6+bDNfyeQ/MdPUy/hKEMYQV17cM= +golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 h1:R84qjqJb5nVJMxqWYb3np9L5ZsaDtB+a39EqjV0JSUM= +golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0/go.mod h1:S9Xr4PYopiDyqSyp5NjCrhFrqg6A5zA2E/iPHPhqnS8= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= @@ -1482,8 +1482,8 @@ golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= -golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= -golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= +golang.org/x/net v0.39.0 h1:ZCu7HMWDxpXpaiKdhzIfaltL9Lp31x/3fCP11bc6/fY= +golang.org/x/net v0.39.0/go.mod h1:X7NRbYVEA+ewNkCNyJ513WmMdQ3BineSwVtN2zD/d+E= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1664,8 +1664,8 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.1.8-0.20211029000441-d6a9af8af023/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.31.0 h1:0EedkvKDbh+qistFTd0Bcwe/YLh4vHwWEkiI0toFIBU= -golang.org/x/tools v0.31.0/go.mod h1:naFTU+Cev749tSJRXJlna0T3WxKvb1kWEx15xA4SdmQ= +golang.org/x/tools v0.32.0 h1:Q7N1vhpkQv7ybVzLFtTjvQya2ewbwNDZzUgfXGqtMWU= +golang.org/x/tools v0.32.0/go.mod h1:ZxrU41P/wAbZD8EDa6dDCa6XfpkhJ7HFMjHJXfBDu8s= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/p2p/nat/natupnp.go b/p2p/nat/natupnp.go index 686aa621c7..7620b4fa96 100644 --- a/p2p/nat/natupnp.go +++ b/p2p/nat/natupnp.go @@ -26,6 +26,7 @@ import ( "sync" "time" + "github.com/ethereum/go-ethereum/log" "github.com/huin/goupnp" "github.com/huin/goupnp/dcps/internetgateway1" "github.com/huin/goupnp/dcps/internetgateway2" @@ -34,6 +35,8 @@ import ( const ( soapRequestTimeout = 3 * time.Second rateLimit = 200 * time.Millisecond + retryCount = 3 // number of retries after a failed AddPortMapping + randomCount = 3 // number of random ports to try ) type upnp struct { @@ -89,42 +92,43 @@ func (n *upnp) AddMapping(protocol string, extport, intport int, desc string, li if extport == 0 { extport = intport - } else { - // Only delete port mapping if the external port was already used by geth. - n.DeleteMapping(protocol, extport, intport) } // Try to add port mapping, preferring the specified external port. - err = n.withRateLimit(func() error { - p, err := n.addAnyPortMapping(protocol, extport, intport, ip, desc, lifetimeS) - if err == nil { - extport = int(p) - } - return err - }) - return uint16(extport), err + return n.addAnyPortMapping(protocol, extport, intport, ip, desc, lifetimeS) } // addAnyPortMapping tries to add a port mapping with the specified external port. // If the external port is already in use, it will try to assign another port. func (n *upnp) addAnyPortMapping(protocol string, extport, intport int, ip net.IP, desc string, lifetimeS uint32) (uint16, error) { if client, ok := n.client.(*internetgateway2.WANIPConnection2); ok { - return client.AddAnyPortMapping("", uint16(extport), protocol, uint16(intport), ip.String(), true, desc, lifetimeS) + return n.portWithRateLimit(func() (uint16, error) { + return client.AddAnyPortMapping("", uint16(extport), protocol, uint16(intport), ip.String(), true, desc, lifetimeS) + }) } // For IGDv1 and v1 services we should first try to add with extport. - err := n.client.AddPortMapping("", uint16(extport), protocol, uint16(intport), ip.String(), true, desc, lifetimeS) - if err == nil { - return uint16(extport), nil + for i := 0; i < retryCount+1; i++ { + err := n.withRateLimit(func() error { + return n.client.AddPortMapping("", uint16(extport), protocol, uint16(intport), ip.String(), true, desc, lifetimeS) + }) + if err == nil { + return uint16(extport), nil + } + log.Debug("Failed to add port mapping", "protocol", protocol, "extport", extport, "intport", intport, "err", err) } // If above fails, we retry with a random port. // We retry several times because of possible port conflicts. - for i := 0; i < 3; i++ { + var err error + for i := 0; i < randomCount; i++ { extport = n.randomPort() - err := n.client.AddPortMapping("", uint16(extport), protocol, uint16(intport), ip.String(), true, desc, lifetimeS) + err := n.withRateLimit(func() error { + return n.client.AddPortMapping("", uint16(extport), protocol, uint16(intport), ip.String(), true, desc, lifetimeS) + }) if err == nil { return uint16(extport), nil } + log.Debug("Failed to add random port mapping", "protocol", protocol, "extport", extport, "intport", intport, "err", err) } return 0, err } @@ -169,6 +173,17 @@ func (n *upnp) String() string { return "UPNP " + n.service } +func (n *upnp) portWithRateLimit(pfn func() (uint16, error)) (uint16, error) { + var port uint16 + var err error + fn := func() error { + port, err = pfn() + return err + } + n.withRateLimit(fn) + return port, err +} + func (n *upnp) withRateLimit(fn func() error) error { n.mu.Lock() defer n.mu.Unlock() diff --git a/p2p/server_nat.go b/p2p/server_nat.go index 48e5d6c11c..437623faf9 100644 --- a/p2p/server_nat.go +++ b/p2p/server_nat.go @@ -31,12 +31,14 @@ const ( portMapRefreshInterval = 8 * time.Minute portMapRetryInterval = 5 * time.Minute extipRetryInterval = 2 * time.Minute + maxRetries = 5 // max number of failed attempts to refresh the mapping ) type portMapping struct { protocol string name string port int + retries int // number of failed attempts to refresh the mapping // for use by the portMappingLoop goroutine: extPort int // the mapped port returned by the NAT interface @@ -154,28 +156,49 @@ func (srv *Server) portMappingLoop() { log.Trace("Attempting port mapping") p, err := srv.NAT.AddMapping(m.protocol, m.extPort, m.port, m.name, portMapDuration) if err != nil { - log.Debug("Couldn't add port mapping", "err", err) - m.extPort = 0 + // Failed to add or refresh port mapping. + if m.extPort == 0 { + log.Debug("Couldn't add port mapping", "err", err) + } else { + // Failed refresh. Since UPnP implementation are often buggy, + // and lifetime is larger than the retry interval, this does not + // mean we lost our existing mapping. We do not reset the external + // port, as it is still our best chance, but we do retry soon. + // We could check the error code, but UPnP implementations are buggy. + log.Debug("Couldn't refresh port mapping", "err", err) + m.retries++ + if m.retries > maxRetries { + m.retries = 0 + err := srv.NAT.DeleteMapping(m.protocol, m.extPort, m.port) + log.Debug("Couldn't refresh port mapping, trying to delete it:", "err", err) + m.extPort = 0 + } + } m.nextTime = srv.clock.Now().Add(portMapRetryInterval) + // Note ENR is not updated here, i.e. we keep the last port. continue } - // It was mapped! - m.extPort = int(p) - m.nextTime = srv.clock.Now().Add(portMapRefreshInterval) - log = newLogger(m.protocol, m.extPort, m.port) - if m.port != m.extPort { - log.Info("NAT mapped alternative port") - } else { - log.Info("NAT mapped port") - } - // Update port in local ENR. - switch m.protocol { - case "TCP": - srv.localnode.Set(enr.TCP(m.extPort)) - case "UDP": - srv.localnode.SetFallbackUDP(m.extPort) + // It was mapped! + m.retries = 0 + log = newLogger(m.protocol, int(p), m.port) + if int(p) != m.extPort { + m.extPort = int(p) + if m.port != m.extPort { + log.Info("NAT mapped alternative port") + } else { + log.Info("NAT mapped port") + } + + // Update port in local ENR. + switch m.protocol { + case "TCP": + srv.localnode.Set(enr.TCP(m.extPort)) + case "UDP": + srv.localnode.SetFallbackUDP(m.extPort) + } } + m.nextTime = srv.clock.Now().Add(portMapRefreshInterval) } } } diff --git a/vendor/github.com/anacrolix/torrent/atomic-count.go b/vendor/github.com/anacrolix/torrent/atomic-count.go new file mode 100644 index 0000000000..415f427a6d --- /dev/null +++ b/vendor/github.com/anacrolix/torrent/atomic-count.go @@ -0,0 +1,39 @@ +package torrent + +import ( + "encoding/json" + "fmt" + "reflect" + "sync/atomic" +) + +type Count struct { + n int64 +} + +var _ fmt.Stringer = (*Count)(nil) + +func (me *Count) Add(n int64) { + atomic.AddInt64(&me.n, n) +} + +func (me *Count) Int64() int64 { + return atomic.LoadInt64(&me.n) +} + +func (me *Count) String() string { + return fmt.Sprintf("%v", me.Int64()) +} + +func (me *Count) MarshalJSON() ([]byte, error) { + return json.Marshal(me.n) +} + +// TODO: Can this use more generics to speed it up? Should we be checking the field types? +func copyCountFields[T any](src *T) (dst T) { + for i := 0; i < reflect.TypeFor[T]().NumField(); i++ { + n := reflect.ValueOf(src).Elem().Field(i).Addr().Interface().(*Count).Int64() + reflect.ValueOf(&dst).Elem().Field(i).Addr().Interface().(*Count).Add(n) + } + return +} diff --git a/vendor/github.com/anacrolix/torrent/client-stats.go b/vendor/github.com/anacrolix/torrent/client-stats.go index bfa6994e98..fb080dbb2b 100644 --- a/vendor/github.com/anacrolix/torrent/client-stats.go +++ b/vendor/github.com/anacrolix/torrent/client-stats.go @@ -20,7 +20,7 @@ type clientHolepunchAddrSets struct { } type ClientStats struct { - ConnStats + TorrentStats // Ongoing outgoing dial attempts. There may be more than one dial going on per peer address due // to hole-punch connect requests. The total may not match the sum of attempts for all Torrents @@ -39,7 +39,12 @@ type ClientStats struct { } func (cl *Client) statsLocked() (stats ClientStats) { - stats.ConnStats = cl.connStats.Copy() + stats.ConnStats = copyCountFields(&cl.connStats) + stats.TorrentStatCounters = copyCountFields(&cl.counters) + for t := range cl.torrents { + stats.TorrentGauges.Add(t.gauges()) + } + stats.ActiveHalfOpenAttempts = cl.numHalfOpen stats.NumPeersUndialableWithoutHolepunch = len(cl.undialableWithoutHolepunch) diff --git a/vendor/github.com/anacrolix/torrent/client.go b/vendor/github.com/anacrolix/torrent/client.go index 9001fce1f9..7b7d979dc7 100644 --- a/vendor/github.com/anacrolix/torrent/client.go +++ b/vendor/github.com/anacrolix/torrent/client.go @@ -18,8 +18,6 @@ import ( "strconv" "time" - "github.com/anacrolix/torrent/webtorrent" - "github.com/anacrolix/chansync" "github.com/anacrolix/chansync/events" "github.com/anacrolix/dht/v2" @@ -49,6 +47,7 @@ import ( "github.com/anacrolix/torrent/tracker" "github.com/anacrolix/torrent/types/infohash" infohash_v2 "github.com/anacrolix/torrent/types/infohash-v2" + "github.com/anacrolix/torrent/webtorrent" ) // Clients contain zero or more Torrents. A Client manages a blocklist, the @@ -57,6 +56,7 @@ type Client struct { // An aggregate of stats over all connections. First in struct to ensure 64-bit alignment of // fields. See #262. connStats ConnStats + counters TorrentStatCounters _mu lockWithDeferreds event sync.Cond @@ -1378,7 +1378,7 @@ func (cl *Client) newTorrentOpt(opts AddTorrentOpts) (t *Torrent) { } t.smartBanCache.Init() t.networkingEnabled.Set() - t.logger = cl.logger.WithDefaultLevel(log.Debug) + t.logger = cl.logger.WithDefaultLevel(log.Debug).WithNames(t.InfoHash().HexString()) t.sourcesLogger = t.logger.WithNames("sources") if opts.ChunkSize == 0 { opts.ChunkSize = defaultChunkSize diff --git a/vendor/github.com/anacrolix/torrent/conn_stats.go b/vendor/github.com/anacrolix/torrent/conn-stats.go similarity index 77% rename from vendor/github.com/anacrolix/torrent/conn_stats.go rename to vendor/github.com/anacrolix/torrent/conn-stats.go index 0c5bfc784e..394ebfdf5d 100644 --- a/vendor/github.com/anacrolix/torrent/conn_stats.go +++ b/vendor/github.com/anacrolix/torrent/conn-stats.go @@ -1,13 +1,8 @@ package torrent import ( - "encoding/json" - "fmt" - "io" - "reflect" - "sync/atomic" - pp "github.com/anacrolix/torrent/peer_protocol" + "io" ) // Various connection-level metrics. At the Torrent level these are aggregates. Chunks are messages @@ -41,33 +36,7 @@ type ConnStats struct { } func (me *ConnStats) Copy() (ret ConnStats) { - for i := 0; i < reflect.TypeOf(ConnStats{}).NumField(); i++ { - n := reflect.ValueOf(me).Elem().Field(i).Addr().Interface().(*Count).Int64() - reflect.ValueOf(&ret).Elem().Field(i).Addr().Interface().(*Count).Add(n) - } - return -} - -type Count struct { - n int64 -} - -var _ fmt.Stringer = (*Count)(nil) - -func (me *Count) Add(n int64) { - atomic.AddInt64(&me.n, n) -} - -func (me *Count) Int64() int64 { - return atomic.LoadInt64(&me.n) -} - -func (me *Count) String() string { - return fmt.Sprintf("%v", me.Int64()) -} - -func (me *Count) MarshalJSON() ([]byte, error) { - return json.Marshal(me.n) + return copyCountFields(me) } func (cs *ConnStats) wroteMsg(msg *pp.Message) { diff --git a/vendor/github.com/anacrolix/torrent/peer.go b/vendor/github.com/anacrolix/torrent/peer.go index 4e49468f6d..35d7066b7d 100644 --- a/vendor/github.com/anacrolix/torrent/peer.go +++ b/vendor/github.com/anacrolix/torrent/peer.go @@ -531,7 +531,7 @@ func iterBitmapsDistinct(skip *bitmap.Bitmap, bms ...bitmap.Bitmap) iter.Func { // connection. func (cn *Peer) postHandshakeStats(f func(*ConnStats)) { t := cn.t - f(&t.stats) + f(&t.connStats) f(&t.cl.connStats) } diff --git a/vendor/github.com/anacrolix/torrent/piece.go b/vendor/github.com/anacrolix/torrent/piece.go index 7dd3f61e30..66ae2b0c86 100644 --- a/vendor/github.com/anacrolix/torrent/piece.go +++ b/vendor/github.com/anacrolix/torrent/piece.go @@ -1,6 +1,7 @@ package torrent import ( + "context" "errors" "fmt" "sync" @@ -15,6 +16,9 @@ import ( "github.com/anacrolix/torrent/storage" ) +// Why is it an int64? +type pieceVerifyCount = int64 + type Piece struct { // The completed piece SHA1 hash, from the metainfo "pieces" field. Nil if the info is not V1 // compatible. @@ -26,7 +30,8 @@ type Piece struct { readerCond chansync.BroadcastCond - numVerifies int64 + numVerifies pieceVerifyCount + numVerifiesCond chansync.BroadcastCond hashing bool marking bool storageCompletionOk bool @@ -177,23 +182,40 @@ func (p *Piece) bytesLeft() (ret pp.Integer) { } // Forces the piece data to be rehashed. -func (p *Piece) VerifyData() { - p.t.cl.lock() - defer p.t.cl.unlock() - target := p.numVerifies + 1 - if p.hashing { - target++ +func (p *Piece) VerifyData() error { + return p.VerifyDataContext(context.Background()) +} + +// Forces the piece data to be rehashed. This might be a temporary method until +// an event-based one is created. Possibly this blocking style is more suited to +// external control of hashing concurrency. +func (p *Piece) VerifyDataContext(ctx context.Context) error { + locker := p.t.cl.locker() + locker.Lock() + target, err := p.t.queuePieceCheck(p.index) + locker.Unlock() + if err != nil { + return err } - // log.Printf("target: %d", target) - p.t.queuePieceCheck(p.index) + //log.Printf("target: %d", target) for { - // log.Printf("got %d verifies", p.numVerifies) - if p.numVerifies >= target { - break + locker.RLock() + done := p.numVerifies >= target + //log.Printf("got %d verifies", p.numVerifies) + numVerifiesChanged := p.numVerifiesCond.Signaled() + locker.RUnlock() + if done { + //log.Print("done") + return nil + } + select { + case <-ctx.Done(): + return ctx.Err() + case <-p.t.closed.Done(): + return errTorrentClosed + case <-numVerifiesChanged: } - p.t.cl.event.Wait() } - // log.Print("done") } func (p *Piece) queuedForHash() bool { diff --git a/vendor/github.com/anacrolix/torrent/reader.go b/vendor/github.com/anacrolix/torrent/reader.go index 039fd99cc9..31d4682c39 100644 --- a/vendor/github.com/anacrolix/torrent/reader.go +++ b/vendor/github.com/anacrolix/torrent/reader.go @@ -202,7 +202,7 @@ func (r *reader) waitAvailable(ctx context.Context, pos, wanted int64, wait bool } select { case <-r.t.closed.Done(): - err = errors.New("torrent closed") + err = errTorrentClosed return case <-ctx.Done(): err = ctx.Err() diff --git a/vendor/github.com/anacrolix/torrent/t.go b/vendor/github.com/anacrolix/torrent/t.go index 219656a6ce..6ec484b6fb 100644 --- a/vendor/github.com/anacrolix/torrent/t.go +++ b/vendor/github.com/anacrolix/torrent/t.go @@ -11,7 +11,9 @@ import ( "github.com/anacrolix/torrent/metainfo" ) -// The Torrent's infohash. This is fixed and cannot change. It uniquely identifies a torrent. +// The Torrent's infohash. This is fixed and cannot change. It uniquely +// identifies a torrent. TODO: If this doesn't change, should we stick to +// referring to a Torrent by the original infohash given to us? func (t *Torrent) InfoHash() metainfo.Hash { return *t.canonicalShortInfohash() } diff --git a/vendor/github.com/anacrolix/torrent/testing.go b/vendor/github.com/anacrolix/torrent/testing.go index 1ab74c7a83..e7854b8bb9 100644 --- a/vendor/github.com/anacrolix/torrent/testing.go +++ b/vendor/github.com/anacrolix/torrent/testing.go @@ -1,11 +1,11 @@ package torrent import ( - "github.com/stretchr/testify/require" "testing" "time" "github.com/anacrolix/log" + "github.com/stretchr/testify/require" pp "github.com/anacrolix/torrent/peer_protocol" ) diff --git a/vendor/github.com/anacrolix/torrent/torrent-stats.go b/vendor/github.com/anacrolix/torrent/torrent-stats.go index 0dd58add90..3f3586e535 100644 --- a/vendor/github.com/anacrolix/torrent/torrent-stats.go +++ b/vendor/github.com/anacrolix/torrent/torrent-stats.go @@ -1,12 +1,21 @@ package torrent +import ( + "reflect" +) + // Due to ConnStats, may require special alignment on some platforms. See // https://github.com/anacrolix/torrent/issues/383. type TorrentStats struct { // Aggregates stats over all connections past and present. Some values may not have much meaning // in the aggregate context. ConnStats + TorrentStatCounters + TorrentGauges +} +// Instantaneous metrics in Torrents, and aggregated for Clients. +type TorrentGauges struct { // Ordered by expected descending quantities (if all is well). TotalPeers int PendingPeers int @@ -15,3 +24,16 @@ type TorrentStats struct { HalfOpenPeers int PiecesComplete int } + +func (me *TorrentGauges) Add(agg TorrentGauges) { + src := reflect.ValueOf(agg) + dst := reflect.ValueOf(me).Elem() + for i := 0; i < reflect.TypeFor[TorrentGauges]().NumField(); i++ { + *dst.Field(i).Addr().Interface().(*int) += src.Field(i).Interface().(int) + } + return +} + +type TorrentStatCounters struct { + BytesHashed Count +} diff --git a/vendor/github.com/anacrolix/torrent/torrent.go b/vendor/github.com/anacrolix/torrent/torrent.go index 8f7e41fa24..c1a381db15 100644 --- a/vendor/github.com/anacrolix/torrent/torrent.go +++ b/vendor/github.com/anacrolix/torrent/torrent.go @@ -52,12 +52,16 @@ import ( "github.com/anacrolix/torrent/webtorrent" ) +var errTorrentClosed = errors.New("torrent closed") + // Maintains state of torrent within a Client. Many methods should not be called before the info is // available, see .Info and .GotInfo. type Torrent struct { // Torrent-level aggregate statistics. First in struct to ensure 64-bit // alignment. See #262. - stats ConnStats + connStats ConnStats + counters TorrentStatCounters + cl *Client logger log.Logger @@ -1141,9 +1145,14 @@ func (t *Torrent) smartBanBlockCheckingWriter(piece pieceIndex) *blockCheckingWr } } +func (t *Torrent) countBytesHashed(n int64) { + t.counters.BytesHashed.Add(n) + t.cl.counters.BytesHashed.Add(n) +} + func (t *Torrent) hashPiece(piece pieceIndex) ( correct bool, - // These are peers that sent us blocks that differ from what we hash here. +// These are peers that sent us blocks that differ from what we hash here. differingPeers map[bannableAddr]struct{}, err error, ) { @@ -1157,6 +1166,9 @@ func (t *Torrent) hashPiece(piece pieceIndex) ( var sum metainfo.Hash // log.Printf("A piece decided to self-hash: %d", piece) sum, err = i.SelfHash() + if err == nil { + t.countBytesHashed(int64(p.length())) + } correct = sum == *p.hash // Can't do smart banning without reading the piece. The smartBanCache is still cleared // in pieceHasher regardless. @@ -1178,6 +1190,7 @@ func (t *Torrent) hashPiece(piece pieceIndex) ( err, )) } + t.countBytesHashed(written) } var sum [20]byte sumExactly(sum[:], h.Sum) @@ -1213,7 +1226,7 @@ func sumExactly(dst []byte, sum func(b []byte) []byte) { } func (t *Torrent) hashPieceWithSpecificHash(piece pieceIndex, h hash.Hash) ( - // These are peers that sent us blocks that differ from what we hash here. +// These are peers that sent us blocks that differ from what we hash here. differingPeers map[bannableAddr]struct{}, err error, ) { @@ -1231,6 +1244,7 @@ func (t *Torrent) hashPieceWithSpecificHash(piece pieceIndex, h hash.Hash) ( // ban peers for all recorded blocks that weren't just written. return } + t.countBytesHashed(written) } // Flush before writing padding, since we would not have recorded the padding blocks. smartBanWriter.Flush() @@ -1254,8 +1268,8 @@ func (t *Torrent) havePiece(index pieceIndex) bool { } func (t *Torrent) maybeDropMutuallyCompletePeer( - // I'm not sure about taking peer here, not all peer implementations actually drop. Maybe that's - // okay? +// I'm not sure about taking peer here, not all peer implementations actually drop. Maybe that's +// okay? p *PeerConn, ) { if !t.cl.config.DropMutuallyCompletePeers { @@ -1367,7 +1381,7 @@ func (t *Torrent) publishPieceStateChange(piece pieceIndex) { if cur != p.publicPieceState { p.publicPieceState = cur t.pieceStateChanges.Publish(PieceStateChange{ - int(piece), + piece, cur, }) } @@ -2046,9 +2060,9 @@ func (t *Torrent) announceRequest( // The following are vaguely described in BEP 3. Left: t.bytesLeftAnnounce(), - Uploaded: t.stats.BytesWrittenData.Int64(), + Uploaded: t.connStats.BytesWrittenData.Int64(), // There's no mention of wasted or unwanted download in the BEP. - Downloaded: t.stats.BytesReadUsefulData.Int64(), + Downloaded: t.connStats.BytesReadUsefulData.Int64(), } } @@ -2199,7 +2213,7 @@ func (t *Torrent) Stats() TorrentStats { return t.statsLocked() } -func (t *Torrent) statsLocked() (ret TorrentStats) { +func (t *Torrent) gauges() (ret TorrentGauges) { ret.ActivePeers = len(t.conns) ret.HalfOpenPeers = len(t.halfOpen) ret.PendingPeers = t.peers.Len() @@ -2210,11 +2224,17 @@ func (t *Torrent) statsLocked() (ret TorrentStats) { ret.ConnectedSeeders++ } } - ret.ConnStats = t.stats.Copy() ret.PiecesComplete = t.numPiecesCompleted() return } +func (t *Torrent) statsLocked() (ret TorrentStats) { + ret.ConnStats = copyCountFields(&t.connStats) + ret.TorrentStatCounters = copyCountFields(&t.counters) + ret.TorrentGauges = t.gauges() + return +} + // The total number of peers in the torrent. func (t *Torrent) numTotalPeers() int { peers := make(map[string]struct{}) @@ -2260,7 +2280,7 @@ func (t *Torrent) addPeerConn(c *PeerConn) (err error) { } }() if t.closed.IsSet() { - return errors.New("torrent closed") + return errTorrentClosed } for c0 := range t.conns { if c.PeerID != c0.PeerID { @@ -2382,6 +2402,7 @@ func (t *Torrent) pieceHashed(piece pieceIndex, passed bool, hashIoErr error) { }) p := t.piece(piece) p.numVerifies++ + p.numVerifiesCond.Broadcast() t.cl.event.Broadcast() if t.closed.IsSet() { return @@ -2534,9 +2555,13 @@ func (t *Torrent) onIncompletePiece(piece pieceIndex) { }) } -func (t *Torrent) tryCreateMorePieceHashers() { - for !t.closed.IsSet() && t.activePieceHashes < t.cl.config.PieceHashersPerTorrent && t.tryCreatePieceHasher() { +func (t *Torrent) tryCreateMorePieceHashers() error { + if t.closed.IsSet() { + return errTorrentClosed } + for t.activePieceHashes < t.cl.config.PieceHashersPerTorrent && t.tryCreatePieceHasher() { + } + return nil } func (t *Torrent) tryCreatePieceHasher() bool { @@ -2647,10 +2672,15 @@ func (t *Torrent) queueInitialPieceCheck(i pieceIndex) { } } -func (t *Torrent) queuePieceCheck(pieceIndex pieceIndex) { +func (t *Torrent) queuePieceCheck(pieceIndex pieceIndex) (targetVerifies pieceVerifyCount, err error) { piece := t.piece(pieceIndex) if !piece.haveHash() { - return + err = errors.New("piece hash unknown") + } + targetVerifies = piece.numVerifies + 1 + if piece.hashing { + // The result of this queued piece check will be the one after the current one. + targetVerifies++ } if piece.queuedForHash() { return @@ -2658,15 +2688,27 @@ func (t *Torrent) queuePieceCheck(pieceIndex pieceIndex) { t.piecesQueuedForHash.Add(bitmap.BitIndex(pieceIndex)) t.publishPieceStateChange(pieceIndex) t.updatePiecePriority(pieceIndex, "Torrent.queuePieceCheck") - t.tryCreateMorePieceHashers() + err = t.tryCreateMorePieceHashers() + return } -// Forces all the pieces to be re-hashed. See also Piece.VerifyData. This should not be called -// before the Info is available. -func (t *Torrent) VerifyData() { - for i := pieceIndex(0); i < t.NumPieces(); i++ { - t.Piece(i).VerifyData() +// Deprecated: Use Torrent.VerifyDataContext. +func (t *Torrent) VerifyData() error { + return t.VerifyDataContext(context.Background()) +} + +// Forces all the pieces to be re-hashed. See also Piece.VerifyDataContext. This +// should not be called before the Info is available. TODO: Make this operate +// concurrently within the configured piece hashers limit. +func (t *Torrent) VerifyDataContext(ctx context.Context) error { + for i := 0; i < t.NumPieces(); i++ { + err := t.Piece(i).VerifyDataContext(ctx) + if err != nil { + err = fmt.Errorf("verifying piece %v: %w", i, err) + return err + } } + return nil } func (t *Torrent) connectingToPeerAddr(addrStr string) bool { @@ -2749,7 +2791,7 @@ func (t *Torrent) AddClientPeer(cl *Client) int { // All stats that include this Torrent. Useful when we want to increment ConnStats but not for every // connection. func (t *Torrent) allStats(f func(*ConnStats)) { - f(&t.stats) + f(&t.connStats) f(&t.cl.connStats) } diff --git a/vendor/github.com/anacrolix/torrent/wstracker.go b/vendor/github.com/anacrolix/torrent/wstracker.go index ed5526db15..f15655c261 100644 --- a/vendor/github.com/anacrolix/torrent/wstracker.go +++ b/vendor/github.com/anacrolix/torrent/wstracker.go @@ -8,14 +8,13 @@ import ( "net/url" "sync" - "github.com/anacrolix/torrent/webtorrent" - "github.com/anacrolix/log" "github.com/gorilla/websocket" "github.com/pion/webrtc/v4" "github.com/anacrolix/torrent/tracker" httpTracker "github.com/anacrolix/torrent/tracker/http" + "github.com/anacrolix/torrent/webtorrent" ) type websocketTrackerStatus struct { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md index 20a0b7771b..e7174e02b7 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.29.14 (2025-04-10) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.29.13 (2025-04-03) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go index 7227968132..8be8c01e06 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go @@ -3,4 +3,4 @@ package config // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.29.13" +const goModuleVersion = "1.29.14" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md index 0f6dd4ac79..d4e4090782 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.17.67 (2025-04-10) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.17.66 (2025-04-03) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go index 8c744d705a..96ab3b85e3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go @@ -3,4 +3,4 @@ package credentials // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.17.66" +const goModuleVersion = "1.17.67" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/CHANGELOG.md index 4d316be252..c2809ef8ad 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.51.1 (2025-04-10) + +* No change notes available for this release. + # v1.51.0 (2025-04-03) * **Feature**: Added us-gov-east-1 and us-gov-west-1 as valid Latency Based Routing regions for change-resource-record-sets. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/go_module_metadata.go index 3a980472c6..d4f6b0e490 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/go_module_metadata.go @@ -3,4 +3,4 @@ package route53 // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.51.0" +const goModuleVersion = "1.51.1" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/internal/endpoints/endpoints.go index 4e2cdc431c..e761afdcef 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/internal/endpoints/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/internal/endpoints/endpoints.go @@ -319,8 +319,19 @@ var defaultPartitions = endpoints.Partitions{ SignatureVersions: []string{"v4"}, }, }, - RegionRegex: partitionRegexp.AwsIsoE, - IsRegionalized: true, + RegionRegex: partitionRegexp.AwsIsoE, + IsRegionalized: false, + PartitionEndpoint: "aws-iso-e-global", + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "aws-iso-e-global", + }: endpoints.Endpoint{ + Hostname: "route53.cloud.adc-e.uk", + CredentialScope: endpoints.CredentialScope{ + Region: "eu-isoe-west-1", + }, + }, + }, }, { ID: "aws-iso-f", diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md index 8006ad91bd..6656137c7f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.33.19 (2025-04-10) + +* No change notes available for this release. + # v1.33.18 (2025-04-03) * No change notes available for this release. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go index 19238851fd..a984a2a6d4 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go @@ -3,4 +3,4 @@ package sts // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.33.18" +const goModuleVersion = "1.33.19" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints/endpoints.go index 7bf890ee25..8ee3eed858 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints/endpoints.go @@ -446,6 +446,11 @@ var defaultPartitions = endpoints.Partitions{ }, RegionRegex: partitionRegexp.AwsIsoE, IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "eu-isoe-west-1", + }: endpoints.Endpoint{}, + }, }, { ID: "aws-iso-f", diff --git a/vendor/github.com/dgraph-io/badger/v4/CHANGELOG.md b/vendor/github.com/dgraph-io/badger/v4/CHANGELOG.md index 44ffe60fdf..05d36674b0 100644 --- a/vendor/github.com/dgraph-io/badger/v4/CHANGELOG.md +++ b/vendor/github.com/dgraph-io/badger/v4/CHANGELOG.md @@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). ## [Unreleased] +- chore(deps): Remove dependency on github.com/pkg/errors (#2184) - chore(deps): Migrate from OpenCensus to OpenTelemetry (#2169) ## [4.5.1] - 2025-01-21 diff --git a/vendor/github.com/dgraph-io/badger/v4/backup.go b/vendor/github.com/dgraph-io/badger/v4/backup.go index cce62d0908..4337e4d16d 100644 --- a/vendor/github.com/dgraph-io/badger/v4/backup.go +++ b/vendor/github.com/dgraph-io/badger/v4/backup.go @@ -10,9 +10,9 @@ import ( "bytes" "context" "encoding/binary" + "fmt" "io" - "github.com/pkg/errors" "google.golang.org/protobuf/proto" "github.com/dgraph-io/badger/v4/pb" @@ -61,7 +61,7 @@ func (stream *Stream) Backup(w io.Writer, since uint64) (uint64, error) { return list, nil } if item.Version() < since { - return nil, errors.Errorf("Backup: Item Version: %d less than sinceTs: %d", + return nil, fmt.Errorf("Backup: Item Version: %d less than sinceTs: %d", item.Version(), since) } diff --git a/vendor/github.com/dgraph-io/badger/v4/batch.go b/vendor/github.com/dgraph-io/badger/v4/batch.go index afef08caed..63e6190973 100644 --- a/vendor/github.com/dgraph-io/badger/v4/batch.go +++ b/vendor/github.com/dgraph-io/badger/v4/batch.go @@ -6,10 +6,11 @@ package badger import ( + "errors" + "fmt" "sync" "sync/atomic" - "github.com/pkg/errors" "google.golang.org/protobuf/proto" "github.com/dgraph-io/badger/v4/pb" @@ -220,7 +221,7 @@ func (wb *WriteBatch) Flush() error { if err := wb.throttle.Finish(); err != nil { if wb.Error() != nil { - return errors.Errorf("wb.err: %s err: %s", wb.Error(), err) + return fmt.Errorf("wb.err: %w err: %w", wb.Error(), err) } return err } diff --git a/vendor/github.com/dgraph-io/badger/v4/db.go b/vendor/github.com/dgraph-io/badger/v4/db.go index 658963759d..f30949ebf0 100644 --- a/vendor/github.com/dgraph-io/badger/v4/db.go +++ b/vendor/github.com/dgraph-io/badger/v4/db.go @@ -9,7 +9,7 @@ import ( "bytes" "context" "encoding/binary" - stderrors "errors" + "errors" "expvar" "fmt" "math" @@ -22,7 +22,6 @@ import ( "time" humanize "github.com/dustin/go-humanize" - "github.com/pkg/errors" "github.com/dgraph-io/badger/v4/fb" "github.com/dgraph-io/badger/v4/options" @@ -145,14 +144,14 @@ func checkAndSetOptions(opt *Options) error { // We are limiting opt.ValueThreshold to maxValueThreshold for now. if opt.ValueThreshold > maxValueThreshold { - return errors.Errorf("Invalid ValueThreshold, must be less or equal to %d", + return fmt.Errorf("Invalid ValueThreshold, must be less or equal to %d", maxValueThreshold) } // If ValueThreshold is greater than opt.maxBatchSize, we won't be able to push any data using // the transaction APIs. Transaction batches entries into batches of size opt.maxBatchSize. if opt.ValueThreshold > opt.maxBatchSize { - return errors.Errorf("Valuethreshold %d greater than max batch size of %d. Either "+ + return fmt.Errorf("Valuethreshold %d greater than max batch size of %d. Either "+ "reduce opt.ValueThreshold or increase opt.BaseTableSize.", opt.ValueThreshold, opt.maxBatchSize) } @@ -373,7 +372,7 @@ func Open(opt Options) (*DB, error) { go db.threshold.listenForValueThresholdUpdate() if err := db.initBannedNamespaces(); err != nil { - return db, errors.Wrapf(err, "While setting banned keys") + return db, fmt.Errorf("While setting banned keys: %w", err) } db.closers.writes = z.NewCloser(1) @@ -787,7 +786,7 @@ func (db *DB) writeToLSM(b *request) error { // running in InMemory mode. In InMemory mode, we don't write anything to the // value log and that's why the length of b.Ptrs will always be zero. if !db.opt.InMemory && len(b.Ptrs) != len(b.Entries) { - return errors.Errorf("Ptrs and Entries don't match: %+v", b) + return fmt.Errorf("Ptrs and Entries don't match: %+v", b) } for i, entry := range b.Entries { @@ -1005,7 +1004,7 @@ func (db *DB) batchSetAsync(entries []*Entry, f func(error)) error { return nil } -var errNoRoom = stderrors.New("No room for write") +var errNoRoom = errors.New("No room for write") // ensureRoomForWrite is always called serially. func (db *DB) ensureRoomForWrite() error { @@ -1963,7 +1962,7 @@ func createDirs(opt Options) error { } if !dirExists { if opt.ReadOnly { - return errors.Errorf("Cannot find directory %q for read-only open", path) + return fmt.Errorf("Cannot find directory %q for read-only open", path) } // Try to create the directory err = os.MkdirAll(path, 0700) @@ -2035,7 +2034,7 @@ func (db *DB) CacheMaxCost(cache CacheType, maxCost int64) (int64, error) { case IndexCache: return db.indexCache.MaxCost(), nil default: - return 0, errors.Errorf("invalid cache type") + return 0, errors.New("invalid cache type") } } @@ -2047,7 +2046,7 @@ func (db *DB) CacheMaxCost(cache CacheType, maxCost int64) (int64, error) { db.indexCache.UpdateMaxCost(maxCost) return maxCost, nil default: - return 0, errors.Errorf("invalid cache type") + return 0, errors.New("invalid cache type") } } diff --git a/vendor/github.com/dgraph-io/badger/v4/levels.go b/vendor/github.com/dgraph-io/badger/v4/levels.go index 48a954316c..3cc7bf694f 100644 --- a/vendor/github.com/dgraph-io/badger/v4/levels.go +++ b/vendor/github.com/dgraph-io/badger/v4/levels.go @@ -9,7 +9,7 @@ import ( "bytes" "context" "encoding/hex" - stderrors "errors" + "errors" "fmt" "math" "math/rand" @@ -20,7 +20,6 @@ import ( "sync/atomic" "time" - "github.com/pkg/errors" "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/attribute" @@ -1502,7 +1501,7 @@ func tablesToString(tables []*table.Table) []string { return res } -var errFillTables = stderrors.New("Unable to fill tables") +var errFillTables = errors.New("Unable to fill tables") // doCompact picks some table on level l and compacts it away to the next level. func (s *levelsController) doCompact(id int, p compactionPriority) error { diff --git a/vendor/github.com/dgraph-io/badger/v4/manifest.go b/vendor/github.com/dgraph-io/badger/v4/manifest.go index 66753788f5..4d03c74991 100644 --- a/vendor/github.com/dgraph-io/badger/v4/manifest.go +++ b/vendor/github.com/dgraph-io/badger/v4/manifest.go @@ -9,7 +9,7 @@ import ( "bufio" "bytes" "encoding/binary" - stderrors "errors" + "errors" "fmt" "hash/crc32" "io" @@ -18,7 +18,6 @@ import ( "path/filepath" "sync" - "github.com/pkg/errors" "google.golang.org/protobuf/proto" "github.com/dgraph-io/badger/v4/options" @@ -342,8 +341,8 @@ func (r *countingReader) ReadByte() (b byte, err error) { } var ( - errBadMagic = stderrors.New("manifest has bad magic") - errBadChecksum = stderrors.New("manifest has checksum mismatch") + errBadMagic = errors.New("manifest has bad magic") + errBadChecksum = errors.New("manifest has checksum mismatch") ) // ReplayManifestFile reads the manifest file and constructs two manifest objects. (We need one @@ -399,7 +398,7 @@ func ReplayManifestFile(fp *os.File, extMagic uint16) (Manifest, int64, error) { length := y.BytesToU32(lenCrcBuf[0:4]) // Sanity check to ensure we don't over-allocate memory. if length > uint32(stat.Size()) { - return Manifest{}, 0, errors.Errorf( + return Manifest{}, 0, fmt.Errorf( "Buffer length: %d greater than file size: %d. Manifest file might be corrupted", length, stat.Size()) } diff --git a/vendor/github.com/dgraph-io/badger/v4/memtable.go b/vendor/github.com/dgraph-io/badger/v4/memtable.go index 7d026d1280..58461cfb91 100644 --- a/vendor/github.com/dgraph-io/badger/v4/memtable.go +++ b/vendor/github.com/dgraph-io/badger/v4/memtable.go @@ -22,8 +22,6 @@ import ( "sync" "sync/atomic" - "github.com/pkg/errors" - "github.com/dgraph-io/badger/v4/pb" "github.com/dgraph-io/badger/v4/skl" "github.com/dgraph-io/badger/v4/y" @@ -147,7 +145,7 @@ func (db *DB) newMemTable() (*memTable, error) { db.opt.Errorf("Got error: %v for id: %d\n", err, db.nextMemFid) return nil, y.Wrapf(err, "newMemTable") } - return nil, errors.Errorf("File %s already exists", mt.wal.Fd.Name()) + return nil, fmt.Errorf("File %s already exists", mt.wal.Fd.Name()) } func (db *DB) mtFilePath(fid int) string { diff --git a/vendor/github.com/dgraph-io/badger/v4/options.go b/vendor/github.com/dgraph-io/badger/v4/options.go index 218b94772f..54eeed51fc 100644 --- a/vendor/github.com/dgraph-io/badger/v4/options.go +++ b/vendor/github.com/dgraph-io/badger/v4/options.go @@ -13,8 +13,6 @@ import ( "strings" "time" - "github.com/pkg/errors" - "github.com/dgraph-io/badger/v4/options" "github.com/dgraph-io/badger/v4/table" "github.com/dgraph-io/badger/v4/y" @@ -234,10 +232,10 @@ func parseCompression(cStr string) (options.CompressionType, int, error) { y.Check(err) if level <= 0 { return 0, 0, - errors.Errorf("ERROR: compression level(%v) must be greater than zero", level) + fmt.Errorf("ERROR: compression level(%v) must be greater than zero", level) } } else if len(cStrSplit) > 2 { - return 0, 0, errors.Errorf("ERROR: Invalid badger.compression argument") + return 0, 0, fmt.Errorf("ERROR: Invalid badger.compression argument") } switch cType { case "zstd": @@ -247,7 +245,7 @@ func parseCompression(cStr string) (options.CompressionType, int, error) { case "none": return options.None, 0, nil } - return 0, 0, errors.Errorf("ERROR: compression type (%s) invalid", cType) + return 0, 0, fmt.Errorf("ERROR: compression type (%s) invalid", cType) } // generateSuperFlag generates an identical SuperFlag string from the provided Options. diff --git a/vendor/github.com/dgraph-io/badger/v4/stream_writer.go b/vendor/github.com/dgraph-io/badger/v4/stream_writer.go index 674a33afa6..981b6e932c 100644 --- a/vendor/github.com/dgraph-io/badger/v4/stream_writer.go +++ b/vendor/github.com/dgraph-io/badger/v4/stream_writer.go @@ -11,7 +11,6 @@ import ( "sync" humanize "github.com/dustin/go-humanize" - "github.com/pkg/errors" "google.golang.org/protobuf/proto" "github.com/dgraph-io/badger/v4/pb" @@ -119,7 +118,7 @@ func (sw *StreamWriter) PrepareIncremental() error { // on the tree, all the data will go to Lmax. All the levels above will be empty // after flatten call. Now, we should be able to use incremental stream writer again. if err := sw.db.Flatten(3); err != nil { - return errors.Wrapf(err, "error during flatten in StreamWriter") + return fmt.Errorf("error during flatten in StreamWriter: %w", err) } sw.prevLevel = len(sw.db.Levels()) - 1 } @@ -417,7 +416,7 @@ func (w *sortedWriter) handleRequests() { // Add adds key and vs to sortedWriter. func (w *sortedWriter) Add(key []byte, vs y.ValueStruct) error { if len(w.lastKey) > 0 && y.CompareKeys(key, w.lastKey) <= 0 { - return errors.Errorf("keys not in sorted order (last key: %s, key: %s)", + return fmt.Errorf("keys not in sorted order (last key: %s, key: %s)", hex.Dump(w.lastKey), hex.Dump(key)) } diff --git a/vendor/github.com/dgraph-io/badger/v4/table/builder.go b/vendor/github.com/dgraph-io/badger/v4/table/builder.go index d590f0961a..70ebc99bdb 100644 --- a/vendor/github.com/dgraph-io/badger/v4/table/builder.go +++ b/vendor/github.com/dgraph-io/badger/v4/table/builder.go @@ -7,6 +7,7 @@ package table import ( "crypto/aes" + "errors" "math" "runtime" "sync" @@ -15,7 +16,6 @@ import ( fbs "github.com/google/flatbuffers/go" "github.com/klauspost/compress/s2" - "github.com/pkg/errors" "google.golang.org/protobuf/proto" "github.com/dgraph-io/badger/v4/fb" diff --git a/vendor/github.com/dgraph-io/badger/v4/table/table.go b/vendor/github.com/dgraph-io/badger/v4/table/table.go index d729d8982a..a32515e2dd 100644 --- a/vendor/github.com/dgraph-io/badger/v4/table/table.go +++ b/vendor/github.com/dgraph-io/badger/v4/table/table.go @@ -9,6 +9,7 @@ import ( "bytes" "crypto/aes" "encoding/binary" + "errors" "fmt" "math" "os" @@ -22,7 +23,6 @@ import ( "github.com/klauspost/compress/snappy" "github.com/klauspost/compress/zstd" - "github.com/pkg/errors" "google.golang.org/protobuf/proto" "github.com/dgraph-io/badger/v4/fb" @@ -250,7 +250,7 @@ func CreateTable(fname string, builder *Builder) (*Table, error) { } else if err != nil { return nil, y.Wrapf(err, "while creating table: %s", fname) } else { - return nil, errors.Errorf("file already exists: %s", fname) + return nil, fmt.Errorf("file already exists: %s", fname) } written := bd.Copy(mf.Data) @@ -281,7 +281,7 @@ func OpenTable(mf *z.MmapFile, opts Options) (*Table, error) { id, ok := ParseFileID(filename) if !ok { mf.Close(-1) - return nil, errors.Errorf("Invalid filename: %s", filename) + return nil, fmt.Errorf("Invalid filename: %s", filename) } t := &Table{ MmapFile: mf, diff --git a/vendor/github.com/dgraph-io/badger/v4/trie/trie.go b/vendor/github.com/dgraph-io/badger/v4/trie/trie.go index 9c0ee7cdb1..5675a4e140 100644 --- a/vendor/github.com/dgraph-io/badger/v4/trie/trie.go +++ b/vendor/github.com/dgraph-io/badger/v4/trie/trie.go @@ -10,8 +10,6 @@ import ( "strconv" "strings" - "github.com/pkg/errors" - "github.com/dgraph-io/badger/v4/pb" "github.com/dgraph-io/badger/v4/y" ) @@ -123,7 +121,7 @@ func (t *Trie) fix(m pb.Match, id uint64, op int) error { ignore, err := parseIgnoreBytes(m.IgnoreBytes) if err != nil { - return errors.Wrapf(err, "while parsing ignore bytes: %s", m.IgnoreBytes) + return fmt.Errorf( "while parsing ignore bytes: %s: %w", m.IgnoreBytes,err) } for len(ignore) < len(m.Prefix) { ignore = append(ignore, false) diff --git a/vendor/github.com/dgraph-io/badger/v4/txn.go b/vendor/github.com/dgraph-io/badger/v4/txn.go index 50d17a5bc2..d5a6af524b 100644 --- a/vendor/github.com/dgraph-io/badger/v4/txn.go +++ b/vendor/github.com/dgraph-io/badger/v4/txn.go @@ -9,14 +9,14 @@ import ( "bytes" "context" "encoding/hex" + "errors" + "fmt" "math" "sort" "strconv" "sync" "sync/atomic" - "github.com/pkg/errors" - "github.com/dgraph-io/badger/v4/y" "github.com/dgraph-io/ristretto/v2/z" ) @@ -344,7 +344,7 @@ func (txn *Txn) checkSize(e *Entry) error { } func exceedsSize(prefix string, max int64, key []byte) error { - return errors.Errorf("%s with size %d exceeded %d limit. %s:\n%s", + return fmt.Errorf("%s with size %d exceeded %d limit. %s:\n%s", prefix, len(key), max, prefix, hex.Dump(key[:1<<10])) } diff --git a/vendor/github.com/dgraph-io/badger/v4/util.go b/vendor/github.com/dgraph-io/badger/v4/util.go index d80b8f3187..d99abee046 100644 --- a/vendor/github.com/dgraph-io/badger/v4/util.go +++ b/vendor/github.com/dgraph-io/badger/v4/util.go @@ -7,12 +7,11 @@ package badger import ( "encoding/hex" + "fmt" "math/rand" "os" "time" - "github.com/pkg/errors" - "github.com/dgraph-io/badger/v4/table" "github.com/dgraph-io/badger/v4/y" ) @@ -37,11 +36,11 @@ func (s *levelHandler) validate() error { numTables := len(s.tables) for j := 1; j < numTables; j++ { if j >= len(s.tables) { - return errors.Errorf("Level %d, j=%d numTables=%d", s.level, j, numTables) + return fmt.Errorf("Level %d, j=%d numTables=%d", s.level, j, numTables) } if y.CompareKeys(s.tables[j-1].Biggest(), s.tables[j].Smallest()) >= 0 { - return errors.Errorf( + return fmt.Errorf( "Inter: Biggest(j-1)[%d] \n%s\n vs Smallest(j)[%d]: \n%s\n: "+ "level=%d j=%d numTables=%d", s.tables[j-1].ID(), hex.Dump(s.tables[j-1].Biggest()), s.tables[j].ID(), @@ -49,7 +48,7 @@ func (s *levelHandler) validate() error { } if y.CompareKeys(s.tables[j].Smallest(), s.tables[j].Biggest()) > 0 { - return errors.Errorf( + return fmt.Errorf( "Intra: \n%s\n vs \n%s\n: level=%d j=%d numTables=%d", hex.Dump(s.tables[j].Smallest()), hex.Dump(s.tables[j].Biggest()), s.level, j, numTables) } diff --git a/vendor/github.com/dgraph-io/badger/v4/value.go b/vendor/github.com/dgraph-io/badger/v4/value.go index 80cc4c4365..e30a80cfb3 100644 --- a/vendor/github.com/dgraph-io/badger/v4/value.go +++ b/vendor/github.com/dgraph-io/badger/v4/value.go @@ -8,7 +8,7 @@ package badger import ( "bytes" "context" - stderrors "errors" + "errors" "fmt" "hash" "hash/crc32" @@ -21,7 +21,6 @@ import ( "sync" "sync/atomic" - "github.com/pkg/errors" "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/attribute" @@ -54,8 +53,8 @@ const ( vlogHeaderSize = 20 ) -var errStop = stderrors.New("Stop iteration") -var errTruncate = stderrors.New("Do truncate") +var errStop = errors.New("Stop iteration") +var errTruncate = errors.New("Do truncate") type logEntry func(e Entry, vp valuePointer) error @@ -165,7 +164,7 @@ func (vlog *valueLog) rewrite(f *logFile) error { for _, fid := range vlog.filesToBeDeleted { if fid == f.fid { vlog.filesLock.RUnlock() - return errors.Errorf("value log file already marked for deletion fid: %d", fid) + return fmt.Errorf("value log file already marked for deletion fid: %d", fid) } } maxFid := vlog.maxFid @@ -194,7 +193,7 @@ func (vlog *valueLog) rewrite(f *logFile) error { // Value is still present in value log. if len(vs.Value) == 0 { - return errors.Errorf("Empty value: %+v", vs) + return fmt.Errorf("Empty value: %+v", vs) } var vp valuePointer vp.Decode(vs.Value) @@ -334,7 +333,7 @@ func (vlog *valueLog) rewrite(f *logFile) error { // Just a sanity-check. if _, ok := vlog.filesMap[f.fid]; !ok { vlog.filesLock.Unlock() - return errors.Errorf("Unable to find fid: %d", f.fid) + return fmt.Errorf("Unable to find fid: %d", f.fid) } if vlog.iteratorCount() == 0 { delete(vlog.filesMap, f.fid) @@ -754,7 +753,7 @@ func (vlog *valueLog) validateWrites(reqs []*request) error { size := estimateRequestSize(req) estimatedVlogOffset := vlogOffset + size if estimatedVlogOffset > uint64(maxVlogFileSize) { - return errors.Errorf("Request size offset %d is bigger than maximum offset %d", + return fmt.Errorf("Request size offset %d is bigger than maximum offset %d", estimatedVlogOffset, maxVlogFileSize) } @@ -906,7 +905,7 @@ func (vlog *valueLog) getFileRLocked(vp valuePointer) (*logFile, error) { ret, ok := vlog.filesMap[vp.Fid] if !ok { // log file has gone away, we can't do anything. Return. - return nil, errors.Errorf("file with ID: %d not found", vp.Fid) + return nil, fmt.Errorf("file with ID: %d not found", vp.Fid) } // Check for valid offset if we are reading from writable log. @@ -916,7 +915,7 @@ func (vlog *valueLog) getFileRLocked(vp valuePointer) (*logFile, error) { if !vlog.opt.ReadOnly && vp.Fid == maxFid { currentOffset := vlog.woffset() if vp.Offset >= currentOffset { - return nil, errors.Errorf( + return nil, fmt.Errorf( "Invalid value pointer offset: %d greater than current offset: %d", vp.Offset, currentOffset) } @@ -961,7 +960,7 @@ func (vlog *valueLog) Read(vp valuePointer, _ *y.Slice) ([]byte, func(), error) } if uint32(len(kv)) < h.klen+h.vlen { vlog.db.opt.Errorf("Invalid read: vp: %+v", vp) - return nil, nil, errors.Errorf("Invalid read: Len: %d read at:[%d:%d]", + return nil, nil, fmt.Errorf("Invalid read: Len: %d read at:[%d:%d]", len(kv), h.klen, h.klen+h.vlen) } return kv[h.klen : h.klen+h.vlen], cb, nil diff --git a/vendor/github.com/dgraph-io/badger/v4/y/error.go b/vendor/github.com/dgraph-io/badger/v4/y/error.go index 239b95d46f..fcd293c4e9 100644 --- a/vendor/github.com/dgraph-io/badger/v4/y/error.go +++ b/vendor/github.com/dgraph-io/badger/v4/y/error.go @@ -18,10 +18,9 @@ package y // (3) You want to generate a new error with stack trace info. Use x.Errorf. import ( + "errors" "fmt" "log" - - "github.com/pkg/errors" ) var debugMode = false @@ -41,14 +40,14 @@ func Check2(_ interface{}, err error) { // AssertTrue asserts that b is true. Otherwise, it would log fatal. func AssertTrue(b bool) { if !b { - log.Fatalf("%+v", errors.Errorf("Assert failed")) + log.Fatalf("%+v", errors.New("Assert failed")) } } // AssertTruef is AssertTrue with extra info. func AssertTruef(b bool, format string, args ...interface{}) { if !b { - log.Fatalf("%+v", errors.Errorf(format, args...)) + log.Fatalf("%+v", fmt.Errorf(format, args...)) } } @@ -60,18 +59,12 @@ func Wrap(err error, msg string) error { } return fmt.Errorf("%s err: %+v", msg, err) } - return errors.Wrap(err, msg) + return fmt.Errorf("%s: %w", msg, err) } // Wrapf is Wrap with extra info. func Wrapf(err error, format string, args ...interface{}) error { - if !debugMode { - if err == nil { - return nil - } - return fmt.Errorf(format+" error: %+v", append(args, err)...) - } - return errors.Wrapf(err, format, args...) + return Wrap(err, fmt.Sprintf(format, args...)) } func CombineErrors(one, other error) error { diff --git a/vendor/github.com/getsentry/sentry-go/CHANGELOG.md b/vendor/github.com/getsentry/sentry-go/CHANGELOG.md index 94a99acd95..41e9269294 100644 --- a/vendor/github.com/getsentry/sentry-go/CHANGELOG.md +++ b/vendor/github.com/getsentry/sentry-go/CHANGELOG.md @@ -1,5 +1,26 @@ # Changelog +## 0.32.0 + +The Sentry SDK team is happy to announce the immediate availability of Sentry Go SDK v0.32.0. + +### Breaking Changes + +- Bump the minimum Go version to 1.22. The supported versions are 1.22, 1.23 and 1.24. ([#967](https://github.com/getsentry/sentry-go/issues/967)) +- Setting any values on `span.Extra` has no effect anymore. Use `SetData(name string, value interface{})` instead. ([#864](https://github.com/getsentry/sentry-go/pull/864)) + +### Features + +- Add a `MockTransport` and `MockScope`. ([#972](https://github.com/getsentry/sentry-go/pull/972)) + +### Bug Fixes + +- Fix writing `*http.Request` in the Logrus JSONFormatter. ([#955](https://github.com/getsentry/sentry-go/issues/955)) + +### Misc + +- Transaction `data` attributes are now seralized as trace context data attributes, allowing you to query these attributes in the [Trace Explorer](https://docs.sentry.io/product/explore/traces/). + ## 0.31.1 The Sentry SDK team is happy to announce the immediate availability of Sentry Go SDK v0.31.1. diff --git a/vendor/github.com/getsentry/sentry-go/hub.go b/vendor/github.com/getsentry/sentry-go/hub.go index 04cebee3e7..12c3c957a6 100644 --- a/vendor/github.com/getsentry/sentry-go/hub.go +++ b/vendor/github.com/getsentry/sentry-go/hub.go @@ -293,14 +293,14 @@ func (hub *Hub) AddBreadcrumb(breadcrumb *Breadcrumb, hint *BreadcrumbHint) { return } - max := client.options.MaxBreadcrumbs + limit := client.options.MaxBreadcrumbs switch { - case max < 0: + case limit < 0: return - case max == 0: - max = defaultMaxBreadcrumbs - case max > maxBreadcrumbs: - max = maxBreadcrumbs + case limit == 0: + limit = defaultMaxBreadcrumbs + case limit > maxBreadcrumbs: + limit = maxBreadcrumbs } if client.options.BeforeBreadcrumb != nil { @@ -313,7 +313,7 @@ func (hub *Hub) AddBreadcrumb(breadcrumb *Breadcrumb, hint *BreadcrumbHint) { } } - hub.Scope().AddBreadcrumb(breadcrumb, max) + hub.Scope().AddBreadcrumb(breadcrumb, limit) } // Recover calls the method of a same name on currently bound Client instance diff --git a/vendor/github.com/getsentry/sentry-go/mocks.go b/vendor/github.com/getsentry/sentry-go/mocks.go new file mode 100644 index 0000000000..e6345abab2 --- /dev/null +++ b/vendor/github.com/getsentry/sentry-go/mocks.go @@ -0,0 +1,47 @@ +package sentry + +import ( + "sync" + "time" +) + +// MockScope implements [Scope] for use in tests. +type MockScope struct { + breadcrumb *Breadcrumb + shouldDropEvent bool +} + +func (scope *MockScope) AddBreadcrumb(breadcrumb *Breadcrumb, _ int) { + scope.breadcrumb = breadcrumb +} + +func (scope *MockScope) ApplyToEvent(event *Event, _ *EventHint, _ *Client) *Event { + if scope.shouldDropEvent { + return nil + } + return event +} + +// MockTransport implements [Transport] for use in tests. +type MockTransport struct { + mu sync.Mutex + events []*Event + lastEvent *Event +} + +func (t *MockTransport) Configure(_ ClientOptions) {} +func (t *MockTransport) SendEvent(event *Event) { + t.mu.Lock() + defer t.mu.Unlock() + t.events = append(t.events, event) + t.lastEvent = event +} +func (t *MockTransport) Flush(_ time.Duration) bool { + return true +} +func (t *MockTransport) Events() []*Event { + t.mu.Lock() + defer t.mu.Unlock() + return t.events +} +func (t *MockTransport) Close() {} diff --git a/vendor/github.com/getsentry/sentry-go/sentry.go b/vendor/github.com/getsentry/sentry-go/sentry.go index 7f2fe05fbd..d59cdab88b 100644 --- a/vendor/github.com/getsentry/sentry-go/sentry.go +++ b/vendor/github.com/getsentry/sentry-go/sentry.go @@ -6,7 +6,7 @@ import ( ) // The version of the SDK. -const SDKVersion = "0.31.1" +const SDKVersion = "0.32.0" // apiVersion is the minimum version of the Sentry API compatible with the // sentry-go SDK. diff --git a/vendor/github.com/getsentry/sentry-go/tracing.go b/vendor/github.com/getsentry/sentry-go/tracing.go index 0c5877c59c..d0b7484665 100644 --- a/vendor/github.com/getsentry/sentry-go/tracing.go +++ b/vendor/github.com/getsentry/sentry-go/tracing.go @@ -38,20 +38,22 @@ const ( // // Spans must be started with either StartSpan or Span.StartChild. type Span struct { //nolint: maligned // prefer readability over optimal memory layout (see note below *) - TraceID TraceID `json:"trace_id"` - SpanID SpanID `json:"span_id"` - ParentSpanID SpanID `json:"parent_span_id"` - Name string `json:"name,omitempty"` - Op string `json:"op,omitempty"` - Description string `json:"description,omitempty"` - Status SpanStatus `json:"status,omitempty"` - Tags map[string]string `json:"tags,omitempty"` - StartTime time.Time `json:"start_timestamp"` - EndTime time.Time `json:"timestamp"` - Data map[string]interface{} `json:"data,omitempty"` - Sampled Sampled `json:"-"` - Source TransactionSource `json:"-"` - Origin SpanOrigin `json:"origin,omitempty"` + TraceID TraceID `json:"trace_id"` + SpanID SpanID `json:"span_id"` + ParentSpanID SpanID `json:"parent_span_id"` + Name string `json:"name,omitempty"` + Op string `json:"op,omitempty"` + Description string `json:"description,omitempty"` + Status SpanStatus `json:"status,omitempty"` + Tags map[string]string `json:"tags,omitempty"` + StartTime time.Time `json:"start_timestamp"` + EndTime time.Time `json:"timestamp"` + // Deprecated: use Data instead. To be removed in 0.33.0 + Extra map[string]interface{} `json:"-"` + Data map[string]interface{} `json:"data,omitempty"` + Sampled Sampled `json:"-"` + Source TransactionSource `json:"-"` + Origin SpanOrigin `json:"origin,omitempty"` // mu protects concurrent writes to map fields mu sync.RWMutex @@ -569,7 +571,6 @@ func (s *Span) toEvent() *Event { Transaction: s.Name, Contexts: contexts, Tags: s.Tags, - Extra: s.Data, Timestamp: s.EndTime, StartTime: s.StartTime, Spans: finished, @@ -588,6 +589,7 @@ func (s *Span) traceContext() *TraceContext { SpanID: s.SpanID, ParentSpanID: s.ParentSpanID, Op: s.Op, + Data: s.Data, Description: s.Description, Status: s.Status, } @@ -763,12 +765,13 @@ func (ss SpanStatus) MarshalJSON() ([]byte, error) { // A TraceContext carries information about an ongoing trace and is meant to be // stored in Event.Contexts (as *TraceContext). type TraceContext struct { - TraceID TraceID `json:"trace_id"` - SpanID SpanID `json:"span_id"` - ParentSpanID SpanID `json:"parent_span_id"` - Op string `json:"op,omitempty"` - Description string `json:"description,omitempty"` - Status SpanStatus `json:"status,omitempty"` + TraceID TraceID `json:"trace_id"` + SpanID SpanID `json:"span_id"` + ParentSpanID SpanID `json:"parent_span_id"` + Op string `json:"op,omitempty"` + Description string `json:"description,omitempty"` + Status SpanStatus `json:"status,omitempty"` + Data map[string]interface{} `json:"data,omitempty"` } func (tc *TraceContext) MarshalJSON() ([]byte, error) { @@ -811,6 +814,10 @@ func (tc TraceContext) Map() map[string]interface{} { m["status"] = tc.Status } + if len(tc.Data) > 0 { + m["data"] = tc.Data + } + return m } diff --git a/vendor/github.com/pion/ice/v4/README.md b/vendor/github.com/pion/ice/v4/README.md index 14e89ade22..5171a41ff4 100644 --- a/vendor/github.com/pion/ice/v4/README.md +++ b/vendor/github.com/pion/ice/v4/README.md @@ -6,7 +6,7 @@
-
+
@@ -20,9 +20,9 @@
The library is used as a part of our WebRTC implementation. Please refer to that [roadmap](https://github.com/pion/webrtc/issues/9) to track our major milestones.
### Community
-Pion has an active community on the [Slack](https://pion.ly/slack).
+Pion has an active community on the [Discord](https://discord.gg/PngbdqpFbt).
-Follow the [Pion Twitter](https://twitter.com/_pion) for project updates and important WebRTC news.
+Follow the [Pion Bluesky](https://bsky.app/profile/pion.ly) or [Pion Twitter](https://twitter.com/_pion) for project updates and important WebRTC news.
We are always looking to support **your projects**. Please reach out if you have something to build!
If you need commercial support or don't want to use public methods you can contact us at [team@pion.ly](mailto:team@pion.ly)
diff --git a/vendor/github.com/pion/ice/v4/agent.go b/vendor/github.com/pion/ice/v4/agent.go
index 87949b16b1..80c89d05bb 100644
--- a/vendor/github.com/pion/ice/v4/agent.go
+++ b/vendor/github.com/pion/ice/v4/agent.go
@@ -267,6 +267,7 @@ func NewAgent(config *AgentConfig) (*Agent, error) { //nolint:gocognit,cyclop
mDNSMode,
mDNSName,
log,
+ loggerFactory,
); err != nil {
log.Warnf("Failed to initialize mDNS %s: %v", mDNSName, err)
}
diff --git a/vendor/github.com/pion/ice/v4/gather.go b/vendor/github.com/pion/ice/v4/gather.go
index 9d6bda0d00..a1e0247160 100644
--- a/vendor/github.com/pion/ice/v4/gather.go
+++ b/vendor/github.com/pion/ice/v4/gather.go
@@ -758,6 +758,7 @@ func (a *Agent) gatherCandidatesRelay(ctx context.Context, urls []*stun.URI) {
conn, connectErr := dtls.Client(&fakenet.PacketConn{Conn: udpConn}, udpConn.RemoteAddr(), &dtls.Config{
ServerName: url.Host,
InsecureSkipVerify: a.insecureSkipVerify, //nolint:gosec
+ LoggerFactory: a.loggerFactory,
})
if connectErr != nil {
a.log.Warnf("Failed to create DTLS client: %v", turnServerAddr, connectErr)
diff --git a/vendor/github.com/pion/ice/v4/mdns.go b/vendor/github.com/pion/ice/v4/mdns.go
index ac0756d8d3..b88909d298 100644
--- a/vendor/github.com/pion/ice/v4/mdns.go
+++ b/vendor/github.com/pion/ice/v4/mdns.go
@@ -47,6 +47,7 @@ func createMulticastDNS(
mDNSMode MulticastDNSMode,
mDNSName string,
log logging.LeveledLogger,
+ loggerFactory logging.LoggerFactory,
) (*mdns.Conn, MulticastDNSMode, error) {
if mDNSMode == MulticastDNSModeDisabled {
return nil, mDNSMode, nil
@@ -124,6 +125,7 @@ func createMulticastDNS(
conn, err := mdns.Server(pktConnV4, pktConnV6, &mdns.Config{
Interfaces: ifcs,
IncludeLoopback: includeLoopback,
+ LoggerFactory: loggerFactory,
})
return conn, mDNSMode, err
@@ -132,6 +134,7 @@ func createMulticastDNS(
Interfaces: ifcs,
IncludeLoopback: includeLoopback,
LocalNames: []string{mDNSName},
+ LoggerFactory: loggerFactory,
})
return conn, mDNSMode, err
diff --git a/vendor/github.com/pion/sctp/.golangci.yml b/vendor/github.com/pion/sctp/.golangci.yml
index 88cb4fbf9e..120faf29be 100644
--- a/vendor/github.com/pion/sctp/.golangci.yml
+++ b/vendor/github.com/pion/sctp/.golangci.yml
@@ -19,12 +19,16 @@ linters-settings:
recommendations:
- errors
forbidigo:
+ analyze-types: true
forbid:
- ^fmt.Print(f|ln)?$
- ^log.(Panic|Fatal|Print)(f|ln)?$
- ^os.Exit$
- ^panic$
- ^print(ln)?$
+ - p: ^testing.T.(Error|Errorf|Fatal|Fatalf|Fail|FailNow)$
+ pkg: ^testing$
+ msg: "use testify/assert instead"
varnamelen:
max-distance: 12
min-name-length: 2
@@ -127,9 +131,12 @@ issues:
exclude-dirs-use-default: false
exclude-rules:
# Allow complex tests and examples, better to be self contained
- - path: (examples|main\.go|_test\.go)
+ - path: (examples|main\.go)
linters:
+ - gocognit
- forbidigo
+ - path: _test\.go
+ linters:
- gocognit
# Allow forbidden identifiers in CLI commands
diff --git a/vendor/github.com/pion/sctp/README.md b/vendor/github.com/pion/sctp/README.md
index a407c46a49..18fa3f1641 100644
--- a/vendor/github.com/pion/sctp/README.md
+++ b/vendor/github.com/pion/sctp/README.md
@@ -6,7 +6,7 @@
-
+
@@ -20,9 +20,9 @@
The library is used as a part of our WebRTC implementation. Please refer to that [roadmap](https://github.com/pion/webrtc/issues/9) to track our major milestones.
### Community
-Pion has an active community on the [Slack](https://pion.ly/slack).
+Pion has an active community on the [Discord](https://discord.gg/PngbdqpFbt).
-Follow the [Pion Twitter](https://twitter.com/_pion) for project updates and important WebRTC news.
+Follow the [Pion Bluesky](https://bsky.app/profile/pion.ly) or [Pion Twitter](https://twitter.com/_pion) for project updates and important WebRTC news.
We are always looking to support **your projects**. Please reach out if you have something to build!
If you need commercial support or don't want to use public methods you can contact us at [team@pion.ly](mailto:team@pion.ly)
diff --git a/vendor/github.com/pion/sctp/association.go b/vendor/github.com/pion/sctp/association.go
index 76eb38c91a..29c2a8537f 100644
--- a/vendor/github.com/pion/sctp/association.go
+++ b/vendor/github.com/pion/sctp/association.go
@@ -2924,9 +2924,8 @@ func (a *Association) onAckTimeout() {
a.awakeWriteLoop()
}
-// bufferedAmount returns total amount (in bytes) of currently buffered user data.
-// This is used only by testing.
-func (a *Association) bufferedAmount() int {
+// BufferedAmount returns total amount (in bytes) of currently buffered user data.
+func (a *Association) BufferedAmount() int {
a.lock.RLock()
defer a.lock.RUnlock()
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/collectorfunc.go b/vendor/github.com/prometheus/client_golang/prometheus/collectorfunc.go
new file mode 100644
index 0000000000..9a71a15db1
--- /dev/null
+++ b/vendor/github.com/prometheus/client_golang/prometheus/collectorfunc.go
@@ -0,0 +1,30 @@
+// Copyright 2025 The Prometheus Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package prometheus
+
+// CollectorFunc is a convenient way to implement a Prometheus Collector
+// without interface boilerplate.
+// This implementation is based on DescribeByCollect method.
+// familiarize yourself to it before using.
+type CollectorFunc func(chan<- Metric)
+
+// Collect calls the defined CollectorFunc function with the provided Metrics channel
+func (f CollectorFunc) Collect(ch chan<- Metric) {
+ f(ch)
+}
+
+// Describe sends the descriptor information using DescribeByCollect
+func (f CollectorFunc) Describe(ch chan<- *Desc) {
+ DescribeByCollect(f, ch)
+}
diff --git a/vendor/golang.org/x/tools/go/ast/astutil/imports.go b/vendor/golang.org/x/tools/go/ast/astutil/imports.go
index a6b5ed0a89..5e5601aa46 100644
--- a/vendor/golang.org/x/tools/go/ast/astutil/imports.go
+++ b/vendor/golang.org/x/tools/go/ast/astutil/imports.go
@@ -9,6 +9,7 @@ import (
"fmt"
"go/ast"
"go/token"
+ "slices"
"strconv"
"strings"
)
@@ -186,7 +187,7 @@ func AddNamedImport(fset *token.FileSet, f *ast.File, name, path string) (added
spec.(*ast.ImportSpec).Path.ValuePos = first.Pos()
first.Specs = append(first.Specs, spec)
}
- f.Decls = append(f.Decls[:i], f.Decls[i+1:]...)
+ f.Decls = slices.Delete(f.Decls, i, i+1)
i--
}
diff --git a/vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go b/vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go
index 65fe2628e9..7b90bc9235 100644
--- a/vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go
+++ b/vendor/golang.org/x/tools/go/gcexportdata/gcexportdata.go
@@ -193,10 +193,7 @@ func Read(in io.Reader, fset *token.FileSet, imports map[string]*types.Package,
return pkg, err
default:
- l := len(data)
- if l > 10 {
- l = 10
- }
+ l := min(len(data), 10)
return nil, fmt.Errorf("unexpected export data with prefix %q for path %s", string(data[:l]), path)
}
}
diff --git a/vendor/golang.org/x/tools/go/packages/external.go b/vendor/golang.org/x/tools/go/packages/external.go
index 91bd62e83b..f37bc65100 100644
--- a/vendor/golang.org/x/tools/go/packages/external.go
+++ b/vendor/golang.org/x/tools/go/packages/external.go
@@ -90,7 +90,7 @@ func findExternalDriver(cfg *Config) driver {
const toolPrefix = "GOPACKAGESDRIVER="
tool := ""
for _, env := range cfg.Env {
- if val := strings.TrimPrefix(env, toolPrefix); val != env {
+ if val, ok := strings.CutPrefix(env, toolPrefix); ok {
tool = val
}
}
diff --git a/vendor/golang.org/x/tools/go/types/typeutil/callee.go b/vendor/golang.org/x/tools/go/types/typeutil/callee.go
index 754380351e..53b7133930 100644
--- a/vendor/golang.org/x/tools/go/types/typeutil/callee.go
+++ b/vendor/golang.org/x/tools/go/types/typeutil/callee.go
@@ -7,45 +7,23 @@ package typeutil
import (
"go/ast"
"go/types"
-
- "golang.org/x/tools/internal/typeparams"
+ _ "unsafe" // for linkname
)
// Callee returns the named target of a function call, if any:
// a function, method, builtin, or variable.
//
// Functions and methods may potentially have type parameters.
+//
+// Note: for calls of instantiated functions and methods, Callee returns
+// the corresponding generic function or method on the generic type.
func Callee(info *types.Info, call *ast.CallExpr) types.Object {
- fun := ast.Unparen(call.Fun)
-
- // Look through type instantiation if necessary.
- isInstance := false
- switch fun.(type) {
- case *ast.IndexExpr, *ast.IndexListExpr:
- // When extracting the callee from an *IndexExpr, we need to check that
- // it is a *types.Func and not a *types.Var.
- // Example: Don't match a slice m within the expression `m[0]()`.
- isInstance = true
- fun, _, _, _ = typeparams.UnpackIndexExpr(fun)
- }
-
- var obj types.Object
- switch fun := fun.(type) {
- case *ast.Ident:
- obj = info.Uses[fun] // type, var, builtin, or declared func
- case *ast.SelectorExpr:
- if sel, ok := info.Selections[fun]; ok {
- obj = sel.Obj() // method or field
- } else {
- obj = info.Uses[fun.Sel] // qualified identifier?
- }
+ obj := info.Uses[usedIdent(info, call.Fun)]
+ if obj == nil {
+ return nil
}
if _, ok := obj.(*types.TypeName); ok {
- return nil // T(x) is a conversion, not a call
- }
- // A Func is required to match instantiations.
- if _, ok := obj.(*types.Func); isInstance && !ok {
- return nil // Was not a Func.
+ return nil
}
return obj
}
@@ -56,13 +34,52 @@ func Callee(info *types.Info, call *ast.CallExpr) types.Object {
// Note: for calls of instantiated functions and methods, StaticCallee returns
// the corresponding generic function or method on the generic type.
func StaticCallee(info *types.Info, call *ast.CallExpr) *types.Func {
- if f, ok := Callee(info, call).(*types.Func); ok && !interfaceMethod(f) {
- return f
+ obj := info.Uses[usedIdent(info, call.Fun)]
+ fn, _ := obj.(*types.Func)
+ if fn == nil || interfaceMethod(fn) {
+ return nil
+ }
+ return fn
+}
+
+// usedIdent is the implementation of [internal/typesinternal.UsedIdent].
+// It returns the identifier associated with e.
+// See typesinternal.UsedIdent for a fuller description.
+// This function should live in typesinternal, but cannot because it would
+// create an import cycle.
+//
+//go:linkname usedIdent
+func usedIdent(info *types.Info, e ast.Expr) *ast.Ident {
+ if info.Types == nil || info.Uses == nil {
+ panic("one of info.Types or info.Uses is nil; both must be populated")
+ }
+ // Look through type instantiation if necessary.
+ switch d := ast.Unparen(e).(type) {
+ case *ast.IndexExpr:
+ if info.Types[d.Index].IsType() {
+ e = d.X
+ }
+ case *ast.IndexListExpr:
+ e = d.X
+ }
+
+ switch e := ast.Unparen(e).(type) {
+ // info.Uses always has the object we want, even for selector expressions.
+ // We don't need info.Selections.
+ // See go/types/recording.go:recordSelection.
+ case *ast.Ident:
+ return e
+ case *ast.SelectorExpr:
+ return e.Sel
}
return nil
}
+// interfaceMethod reports whether its argument is a method of an interface.
+// This function should live in typesinternal, but cannot because it would create an import cycle.
+//
+//go:linkname interfaceMethod
func interfaceMethod(f *types.Func) bool {
- recv := f.Type().(*types.Signature).Recv()
+ recv := f.Signature().Recv()
return recv != nil && types.IsInterface(recv.Type())
}
diff --git a/vendor/golang.org/x/tools/internal/event/label/label.go b/vendor/golang.org/x/tools/internal/event/label/label.go
index 7c00ca2a6d..92a3910573 100644
--- a/vendor/golang.org/x/tools/internal/event/label/label.go
+++ b/vendor/golang.org/x/tools/internal/event/label/label.go
@@ -8,6 +8,7 @@ import (
"fmt"
"io"
"reflect"
+ "slices"
"unsafe"
)
@@ -154,10 +155,8 @@ func (f *filter) Valid(index int) bool {
func (f *filter) Label(index int) Label {
l := f.underlying.Label(index)
- for _, f := range f.keys {
- if l.Key() == f {
- return Label{}
- }
+ if slices.Contains(f.keys, l.Key()) {
+ return Label{}
}
return l
}
diff --git a/vendor/golang.org/x/tools/internal/gcimporter/iexport.go b/vendor/golang.org/x/tools/internal/gcimporter/iexport.go
index 253d6493c2..780873e3ae 100644
--- a/vendor/golang.org/x/tools/internal/gcimporter/iexport.go
+++ b/vendor/golang.org/x/tools/internal/gcimporter/iexport.go
@@ -236,6 +236,7 @@ import (
"io"
"math/big"
"reflect"
+ "slices"
"sort"
"strconv"
"strings"
@@ -271,10 +272,10 @@ import (
// file system, be sure to include a cryptographic digest of the executable in
// the key to avoid version skew.
//
-// If the provided reportf func is non-nil, it will be used for reporting bugs
-// encountered during export.
-// TODO(rfindley): remove reportf when we are confident enough in the new
-// objectpath encoding.
+// If the provided reportf func is non-nil, it is used for reporting
+// bugs (e.g. recovered panics) encountered during export, enabling us
+// to obtain via telemetry the stack that would otherwise be lost by
+// merely returning an error.
func IExportShallow(fset *token.FileSet, pkg *types.Package, reportf ReportFunc) ([]byte, error) {
// In principle this operation can only fail if out.Write fails,
// but that's impossible for bytes.Buffer---and as a matter of
@@ -283,7 +284,7 @@ func IExportShallow(fset *token.FileSet, pkg *types.Package, reportf ReportFunc)
// TODO(adonovan): use byte slices throughout, avoiding copying.
const bundle, shallow = false, true
var out bytes.Buffer
- err := iexportCommon(&out, fset, bundle, shallow, iexportVersion, []*types.Package{pkg})
+ err := iexportCommon(&out, fset, bundle, shallow, iexportVersion, []*types.Package{pkg}, reportf)
return out.Bytes(), err
}
@@ -323,20 +324,27 @@ const bundleVersion = 0
// so that calls to IImportData can override with a provided package path.
func IExportData(out io.Writer, fset *token.FileSet, pkg *types.Package) error {
const bundle, shallow = false, false
- return iexportCommon(out, fset, bundle, shallow, iexportVersion, []*types.Package{pkg})
+ return iexportCommon(out, fset, bundle, shallow, iexportVersion, []*types.Package{pkg}, nil)
}
// IExportBundle writes an indexed export bundle for pkgs to out.
func IExportBundle(out io.Writer, fset *token.FileSet, pkgs []*types.Package) error {
const bundle, shallow = true, false
- return iexportCommon(out, fset, bundle, shallow, iexportVersion, pkgs)
+ return iexportCommon(out, fset, bundle, shallow, iexportVersion, pkgs, nil)
}
-func iexportCommon(out io.Writer, fset *token.FileSet, bundle, shallow bool, version int, pkgs []*types.Package) (err error) {
+func iexportCommon(out io.Writer, fset *token.FileSet, bundle, shallow bool, version int, pkgs []*types.Package, reportf ReportFunc) (err error) {
if !debug {
defer func() {
if e := recover(); e != nil {
+ // Report the stack via telemetry (see #71067).
+ if reportf != nil {
+ reportf("panic in exporter")
+ }
if ierr, ok := e.(internalError); ok {
+ // internalError usually means we exported a
+ // bad go/types data structure: a violation
+ // of an implicit precondition of Export.
err = ierr
return
}
@@ -458,7 +466,7 @@ func (p *iexporter) encodeFile(w *intWriter, file *token.File, needed []uint64)
w.uint64(size)
// Sort the set of needed offsets. Duplicates are harmless.
- sort.Slice(needed, func(i, j int) bool { return needed[i] < needed[j] })
+ slices.Sort(needed)
lines := file.Lines() // byte offset of each line start
w.uint64(uint64(len(lines)))
@@ -812,7 +820,7 @@ func (p *iexporter) doDecl(obj types.Object) {
n := named.NumMethods()
w.uint64(uint64(n))
- for i := 0; i < n; i++ {
+ for i := range n {
m := named.Method(i)
w.pos(m.Pos())
w.string(m.Name())
@@ -1089,7 +1097,7 @@ func (w *exportWriter) doTyp(t types.Type, pkg *types.Package) {
w.pkg(fieldPkg)
w.uint64(uint64(n))
- for i := 0; i < n; i++ {
+ for i := range n {
f := t.Field(i)
if w.p.shallow {
w.objectPath(f)
@@ -1138,7 +1146,7 @@ func (w *exportWriter) doTyp(t types.Type, pkg *types.Package) {
w.startType(unionType)
nt := t.Len()
w.uint64(uint64(nt))
- for i := 0; i < nt; i++ {
+ for i := range nt {
term := t.Term(i)
w.bool(term.Tilde())
w.typ(term.Type(), pkg)
@@ -1267,7 +1275,7 @@ func tparamName(exportName string) string {
func (w *exportWriter) paramList(tup *types.Tuple) {
n := tup.Len()
w.uint64(uint64(n))
- for i := 0; i < n; i++ {
+ for i := range n {
w.param(tup.At(i))
}
}
diff --git a/vendor/golang.org/x/tools/internal/gcimporter/iimport.go b/vendor/golang.org/x/tools/internal/gcimporter/iimport.go
index bc6c9741e7..82e6c9d2dc 100644
--- a/vendor/golang.org/x/tools/internal/gcimporter/iimport.go
+++ b/vendor/golang.org/x/tools/internal/gcimporter/iimport.go
@@ -16,6 +16,7 @@ import (
"go/types"
"io"
"math/big"
+ "slices"
"sort"
"strings"
@@ -314,7 +315,7 @@ func iimportCommon(fset *token.FileSet, getPackages GetPackagesFunc, data []byte
pkgs = pkgList[:1]
// record all referenced packages as imports
- list := append(([]*types.Package)(nil), pkgList[1:]...)
+ list := slices.Clone(pkgList[1:])
sort.Sort(byPath(list))
pkgs[0].SetImports(list)
}
diff --git a/vendor/golang.org/x/tools/internal/gocommand/invoke.go b/vendor/golang.org/x/tools/internal/gocommand/invoke.go
index 7ea9013447..58721202de 100644
--- a/vendor/golang.org/x/tools/internal/gocommand/invoke.go
+++ b/vendor/golang.org/x/tools/internal/gocommand/invoke.go
@@ -141,7 +141,7 @@ func (runner *Runner) runPiped(ctx context.Context, inv Invocation, stdout, stde
// Wait for all in-progress go commands to return before proceeding,
// to avoid load concurrency errors.
- for i := 0; i < maxInFlight; i++ {
+ for range maxInFlight {
select {
case <-ctx.Done():
return ctx.Err(), ctx.Err()
diff --git a/vendor/golang.org/x/tools/internal/gopathwalk/walk.go b/vendor/golang.org/x/tools/internal/gopathwalk/walk.go
index 984b79c2a0..5252144d04 100644
--- a/vendor/golang.org/x/tools/internal/gopathwalk/walk.go
+++ b/vendor/golang.org/x/tools/internal/gopathwalk/walk.go
@@ -14,6 +14,7 @@ import (
"os"
"path/filepath"
"runtime"
+ "slices"
"strings"
"sync"
"time"
@@ -195,10 +196,8 @@ func (w *walker) getIgnoredDirs(path string) []string {
// shouldSkipDir reports whether the file should be skipped or not.
func (w *walker) shouldSkipDir(dir string) bool {
- for _, ignoredDir := range w.ignoredDirs {
- if dir == ignoredDir {
- return true
- }
+ if slices.Contains(w.ignoredDirs, dir) {
+ return true
}
if w.skip != nil {
// Check with the user specified callback.
diff --git a/vendor/golang.org/x/tools/internal/imports/fix.go b/vendor/golang.org/x/tools/internal/imports/fix.go
index 737a9bfae8..89b96381cd 100644
--- a/vendor/golang.org/x/tools/internal/imports/fix.go
+++ b/vendor/golang.org/x/tools/internal/imports/fix.go
@@ -32,6 +32,7 @@ import (
"golang.org/x/tools/internal/gocommand"
"golang.org/x/tools/internal/gopathwalk"
"golang.org/x/tools/internal/stdlib"
+ "maps"
)
// importToGroup is a list of functions which map from an import path to
@@ -585,7 +586,7 @@ func getFixesWithSource(ctx context.Context, fset *token.FileSet, f *ast.File, f
srcDir := filepath.Dir(abs)
if logf != nil {
- logf("fixImports(filename=%q), srcDir=%q ...", filename, abs, srcDir)
+ logf("fixImports(filename=%q), srcDir=%q ...", filename, srcDir)
}
// First pass: looking only at f, and using the naive algorithm to
@@ -968,9 +969,7 @@ func (e *ProcessEnv) CopyConfig() *ProcessEnv {
resolver: nil,
Env: map[string]string{},
}
- for k, v := range e.Env {
- copy.Env[k] = v
- }
+ maps.Copy(copy.Env, e.Env)
return copy
}
@@ -1003,9 +1002,7 @@ func (e *ProcessEnv) init() error {
if err := json.Unmarshal(stdout.Bytes(), &goEnv); err != nil {
return err
}
- for k, v := range goEnv {
- e.Env[k] = v
- }
+ maps.Copy(e.Env, goEnv)
e.initialized = true
return nil
}
diff --git a/vendor/golang.org/x/tools/internal/imports/mod.go b/vendor/golang.org/x/tools/internal/imports/mod.go
index 8555e3f83d..df94ec8186 100644
--- a/vendor/golang.org/x/tools/internal/imports/mod.go
+++ b/vendor/golang.org/x/tools/internal/imports/mod.go
@@ -13,6 +13,7 @@ import (
"path"
"path/filepath"
"regexp"
+ "slices"
"sort"
"strconv"
"strings"
@@ -150,8 +151,8 @@ func newModuleResolver(e *ProcessEnv, moduleCacheCache *DirInfoCache) (*ModuleRe
Path: "",
Dir: filepath.Join(filepath.Dir(goWork), "vendor"),
}
- r.modsByModPath = append(append([]*gocommand.ModuleJSON{}, mainModsVendor...), r.dummyVendorMod)
- r.modsByDir = append(append([]*gocommand.ModuleJSON{}, mainModsVendor...), r.dummyVendorMod)
+ r.modsByModPath = append(slices.Clone(mainModsVendor), r.dummyVendorMod)
+ r.modsByDir = append(slices.Clone(mainModsVendor), r.dummyVendorMod)
}
} else {
// Vendor mode is off, so run go list -m ... to find everything.
diff --git a/vendor/golang.org/x/tools/internal/imports/mod_cache.go b/vendor/golang.org/x/tools/internal/imports/mod_cache.go
index b1192696b2..b96c9d4bf7 100644
--- a/vendor/golang.org/x/tools/internal/imports/mod_cache.go
+++ b/vendor/golang.org/x/tools/internal/imports/mod_cache.go
@@ -128,7 +128,7 @@ func (d *DirInfoCache) ScanAndListen(ctx context.Context, listener cacheListener
// are going to be. Setting an arbitrary limit makes it much easier.
const maxInFlight = 10
sema := make(chan struct{}, maxInFlight)
- for i := 0; i < maxInFlight; i++ {
+ for range maxInFlight {
sema <- struct{}{}
}
@@ -156,7 +156,7 @@ func (d *DirInfoCache) ScanAndListen(ctx context.Context, listener cacheListener
d.mu.Lock()
delete(d.listeners, cookie)
d.mu.Unlock()
- for i := 0; i < maxInFlight; i++ {
+ for range maxInFlight {
<-sema
}
}
diff --git a/vendor/golang.org/x/tools/internal/imports/sortimports.go b/vendor/golang.org/x/tools/internal/imports/sortimports.go
index da8194fd96..67c17bc431 100644
--- a/vendor/golang.org/x/tools/internal/imports/sortimports.go
+++ b/vendor/golang.org/x/tools/internal/imports/sortimports.go
@@ -11,6 +11,7 @@ import (
"go/ast"
"go/token"
"log"
+ "slices"
"sort"
"strconv"
)
@@ -30,7 +31,7 @@ func sortImports(localPrefix string, tokFile *token.File, f *ast.File) {
if len(d.Specs) == 0 {
// Empty import block, remove it.
- f.Decls = append(f.Decls[:i], f.Decls[i+1:]...)
+ f.Decls = slices.Delete(f.Decls, i, i+1)
}
if !d.Lparen.IsValid() {
@@ -91,7 +92,7 @@ func mergeImports(f *ast.File) {
spec.(*ast.ImportSpec).Path.ValuePos = first.Pos()
first.Specs = append(first.Specs, spec)
}
- f.Decls = append(f.Decls[:i], f.Decls[i+1:]...)
+ f.Decls = slices.Delete(f.Decls, i, i+1)
i--
}
}
diff --git a/vendor/golang.org/x/tools/internal/modindex/lookup.go b/vendor/golang.org/x/tools/internal/modindex/lookup.go
index 5499c5c67f..bd605e0d76 100644
--- a/vendor/golang.org/x/tools/internal/modindex/lookup.go
+++ b/vendor/golang.org/x/tools/internal/modindex/lookup.go
@@ -120,7 +120,7 @@ func (ix *Index) Lookup(pkg, name string, prefix bool) []Candidate {
px.Results = int16(n)
if len(flds) >= 4 {
sig := strings.Split(flds[3], " ")
- for i := 0; i < len(sig); i++ {
+ for i := range sig {
// $ cannot otherwise occur. removing the spaces
// almost works, but for chan struct{}, e.g.
sig[i] = strings.Replace(sig[i], "$", " ", -1)
@@ -136,7 +136,7 @@ func (ix *Index) Lookup(pkg, name string, prefix bool) []Candidate {
func toFields(sig []string) []Field {
ans := make([]Field, len(sig)/2)
- for i := 0; i < len(ans); i++ {
+ for i := range ans {
ans[i] = Field{Arg: sig[2*i], Type: sig[2*i+1]}
}
return ans
diff --git a/vendor/golang.org/x/tools/internal/pkgbits/decoder.go b/vendor/golang.org/x/tools/internal/pkgbits/decoder.go
index f6cb37c5c3..c0aba26c48 100644
--- a/vendor/golang.org/x/tools/internal/pkgbits/decoder.go
+++ b/vendor/golang.org/x/tools/internal/pkgbits/decoder.go
@@ -259,7 +259,7 @@ func (r *Decoder) rawUvarint() uint64 {
func readUvarint(r *strings.Reader) (uint64, error) {
var x uint64
var s uint
- for i := 0; i < binary.MaxVarintLen64; i++ {
+ for i := range binary.MaxVarintLen64 {
b, err := r.ReadByte()
if err != nil {
if i > 0 && err == io.EOF {
diff --git a/vendor/golang.org/x/tools/internal/stdlib/deps.go b/vendor/golang.org/x/tools/internal/stdlib/deps.go
index 7cca431cd6..c50bf406b7 100644
--- a/vendor/golang.org/x/tools/internal/stdlib/deps.go
+++ b/vendor/golang.org/x/tools/internal/stdlib/deps.go
@@ -12,348 +12,348 @@ type pkginfo struct {
}
var deps = [...]pkginfo{
- {"archive/tar", "\x03k\x03E5\x01\v\x01#\x01\x01\x02\x05\t\x02\x01\x02\x02\v"},
- {"archive/zip", "\x02\x04a\a\x16\x0205\x01+\x05\x01\x10\x03\x02\r\x04"},
- {"bufio", "\x03k}E\x13"},
- {"bytes", "n+R\x03\fG\x02\x02"},
+ {"archive/tar", "\x03j\x03E6\x01\v\x01\"\x01\x01\x02\x05\n\x02\x01\x02\x02\v"},
+ {"archive/zip", "\x02\x04`\a\x16\x0206\x01*\x05\x01\x11\x03\x02\r\x04"},
+ {"bufio", "\x03j~E\x13"},
+ {"bytes", "m+S\x03\fG\x02\x02"},
{"cmp", ""},
{"compress/bzip2", "\x02\x02\xe7\x01B"},
- {"compress/flate", "\x02l\x03z\r\x024\x01\x03"},
- {"compress/gzip", "\x02\x04a\a\x03\x15eT"},
- {"compress/lzw", "\x02l\x03z"},
- {"compress/zlib", "\x02\x04a\a\x03\x13\x01f"},
+ {"compress/flate", "\x02k\x03{\r\x024\x01\x03"},
+ {"compress/gzip", "\x02\x04`\a\x03\x15fT"},
+ {"compress/lzw", "\x02k\x03{"},
+ {"compress/zlib", "\x02\x04`\a\x03\x13\x01g"},
{"container/heap", "\xae\x02"},
{"container/list", ""},
{"container/ring", ""},
- {"context", "n\\h\x01\f"},
- {"crypto", "\x84\x01gD"},
+ {"context", "m\\i\x01\f"},
+ {"crypto", "\x83\x01hD"},
{"crypto/aes", "\x10\n\a\x8e\x02"},
- {"crypto/cipher", "\x03\x1e\x01\x01\x1d\x11\x1d,Q"},
- {"crypto/des", "\x10\x13\x1d.,\x95\x01\x03"},
- {"crypto/dsa", "@\x04*}\x0e"},
- {"crypto/ecdh", "\x03\v\f\x0e\x04\x14\x04\r\x1d}"},
- {"crypto/ecdsa", "\x0e\x05\x03\x04\x01\x0e\x16\x01\x04\f\x01\x1d}\x0e\x04K\x01"},
- {"crypto/ed25519", "\x0e\x1c\x16\n\a\x1d}D"},
- {"crypto/elliptic", "0>}\x0e9"},
- {"crypto/fips140", " \x05\x91\x01"},
- {"crypto/hkdf", "-\x12\x01.\x16"},
- {"crypto/hmac", "\x1a\x14\x11\x01\x113"},
- {"crypto/internal/boring", "\x0e\x02\rg"},
+ {"crypto/cipher", "\x03\x1e\x01\x01\x1d\x11\x1c,R"},
+ {"crypto/des", "\x10\x13\x1d-,\x96\x01\x03"},
+ {"crypto/dsa", "@\x04)~\x0e"},
+ {"crypto/ecdh", "\x03\v\f\x0e\x04\x14\x04\r\x1c~"},
+ {"crypto/ecdsa", "\x0e\x05\x03\x04\x01\x0e\x16\x01\x04\f\x01\x1c~\x0e\x04K\x01"},
+ {"crypto/ed25519", "\x0e\x1c\x16\n\a\x1c~D"},
+ {"crypto/elliptic", "0=~\x0e9"},
+ {"crypto/fips140", " \x05\x90\x01"},
+ {"crypto/hkdf", "-\x12\x01-\x16"},
+ {"crypto/hmac", "\x1a\x14\x11\x01\x112"},
+ {"crypto/internal/boring", "\x0e\x02\rf"},
{"crypto/internal/boring/bbig", "\x1a\xdf\x01L"},
{"crypto/internal/boring/bcache", "\xb3\x02\x12"},
{"crypto/internal/boring/sig", ""},
- {"crypto/internal/cryptotest", "\x03\r\n)\x0e\x1a\x06\x13\x12#\a\t\x11\x11\x11\x1b\x01\f\f\x05\n"},
+ {"crypto/internal/cryptotest", "\x03\r\n)\x0e\x19\x06\x13\x12#\a\t\x11\x12\x11\x1a\r\r\x05\n"},
{"crypto/internal/entropy", "E"},
- {"crypto/internal/fips140", ">0}9\f\x15"},
- {"crypto/internal/fips140/aes", "\x03\x1d\x03\x02\x13\x04\x01\x01\x05+\x8c\x015"},
- {"crypto/internal/fips140/aes/gcm", " \x01\x02\x02\x02\x11\x04\x01\x06+\x8a\x01"},
+ {"crypto/internal/fips140", ">/~8\r\x15"},
+ {"crypto/internal/fips140/aes", "\x03\x1d\x03\x02\x13\x04\x01\x01\x05*\x8d\x015"},
+ {"crypto/internal/fips140/aes/gcm", " \x01\x02\x02\x02\x11\x04\x01\x06*\x8b\x01"},
{"crypto/internal/fips140/alias", "\xc5\x02"},
- {"crypto/internal/fips140/bigmod", "%\x17\x01\x06+\x8c\x01"},
+ {"crypto/internal/fips140/bigmod", "%\x17\x01\x06*\x8d\x01"},
{"crypto/internal/fips140/check", " \x0e\x06\b\x02\xad\x01Z"},
- {"crypto/internal/fips140/check/checktest", "%\xff\x01!"},
- {"crypto/internal/fips140/drbg", "\x03\x1c\x01\x01\x04\x13\x04\b\x01)}\x0f8"},
- {"crypto/internal/fips140/ecdh", "\x03\x1d\x05\x02\t\f2}\x0f8"},
- {"crypto/internal/fips140/ecdsa", "\x03\x1d\x04\x01\x02\a\x02\x068}G"},
- {"crypto/internal/fips140/ed25519", "\x03\x1d\x05\x02\x04\v8\xc1\x01\x03"},
- {"crypto/internal/fips140/edwards25519", "%\a\f\x042\x8c\x018"},
- {"crypto/internal/fips140/edwards25519/field", "%\x13\x042\x8c\x01"},
- {"crypto/internal/fips140/hkdf", "\x03\x1d\x05\t\x06:"},
- {"crypto/internal/fips140/hmac", "\x03\x1d\x14\x01\x018"},
- {"crypto/internal/fips140/mlkem", "\x03\x1d\x05\x02\x0e\x03\x042"},
- {"crypto/internal/fips140/nistec", "%\f\a\x042\x8c\x01*\x0e\x13"},
- {"crypto/internal/fips140/nistec/fiat", "%\x136\x8c\x01"},
- {"crypto/internal/fips140/pbkdf2", "\x03\x1d\x05\t\x06:"},
- {"crypto/internal/fips140/rsa", "\x03\x1d\x04\x01\x02\r\x01\x01\x026}G"},
- {"crypto/internal/fips140/sha256", "\x03\x1d\x1c\x01\x06+\x8c\x01"},
- {"crypto/internal/fips140/sha3", "\x03\x1d\x18\x04\x011\x8c\x01K"},
- {"crypto/internal/fips140/sha512", "\x03\x1d\x1c\x01\x06+\x8c\x01"},
+ {"crypto/internal/fips140/check/checktest", "%\xfe\x01\""},
+ {"crypto/internal/fips140/drbg", "\x03\x1c\x01\x01\x04\x13\x04\b\x01(~\x0f8"},
+ {"crypto/internal/fips140/ecdh", "\x03\x1d\x05\x02\t\f1~\x0f8"},
+ {"crypto/internal/fips140/ecdsa", "\x03\x1d\x04\x01\x02\a\x02\x067~G"},
+ {"crypto/internal/fips140/ed25519", "\x03\x1d\x05\x02\x04\v7\xc2\x01\x03"},
+ {"crypto/internal/fips140/edwards25519", "%\a\f\x041\x8d\x018"},
+ {"crypto/internal/fips140/edwards25519/field", "%\x13\x041\x8d\x01"},
+ {"crypto/internal/fips140/hkdf", "\x03\x1d\x05\t\x069"},
+ {"crypto/internal/fips140/hmac", "\x03\x1d\x14\x01\x017"},
+ {"crypto/internal/fips140/mlkem", "\x03\x1d\x05\x02\x0e\x03\x041"},
+ {"crypto/internal/fips140/nistec", "%\f\a\x041\x8d\x01)\x0f\x13"},
+ {"crypto/internal/fips140/nistec/fiat", "%\x135\x8d\x01"},
+ {"crypto/internal/fips140/pbkdf2", "\x03\x1d\x05\t\x069"},
+ {"crypto/internal/fips140/rsa", "\x03\x1d\x04\x01\x02\r\x01\x01\x025~G"},
+ {"crypto/internal/fips140/sha256", "\x03\x1d\x1c\x01\x06*\x8d\x01"},
+ {"crypto/internal/fips140/sha3", "\x03\x1d\x18\x04\x010\x8d\x01K"},
+ {"crypto/internal/fips140/sha512", "\x03\x1d\x1c\x01\x06*\x8d\x01"},
{"crypto/internal/fips140/ssh", " \x05"},
- {"crypto/internal/fips140/subtle", "#\x19\xbe\x01"},
- {"crypto/internal/fips140/tls12", "\x03\x1d\x05\t\x06\x028"},
- {"crypto/internal/fips140/tls13", "\x03\x1d\x05\b\a\b2"},
+ {"crypto/internal/fips140/subtle", "#"},
+ {"crypto/internal/fips140/tls12", "\x03\x1d\x05\t\x06\x027"},
+ {"crypto/internal/fips140/tls13", "\x03\x1d\x05\b\a\b1"},
{"crypto/internal/fips140deps", ""},
- {"crypto/internal/fips140deps/byteorder", "\x9a\x01"},
- {"crypto/internal/fips140deps/cpu", "\xae\x01\a"},
- {"crypto/internal/fips140deps/godebug", "\xb6\x01"},
- {"crypto/internal/fips140hash", "5\x1a5\xc1\x01"},
- {"crypto/internal/fips140only", "'\r\x01\x01N25"},
+ {"crypto/internal/fips140deps/byteorder", "\x99\x01"},
+ {"crypto/internal/fips140deps/cpu", "\xad\x01\a"},
+ {"crypto/internal/fips140deps/godebug", "\xb5\x01"},
+ {"crypto/internal/fips140hash", "5\x1a4\xc2\x01"},
+ {"crypto/internal/fips140only", "'\r\x01\x01M26"},
{"crypto/internal/fips140test", ""},
- {"crypto/internal/hpke", "\x0e\x01\x01\x03\x1a\x1d$,`M"},
+ {"crypto/internal/hpke", "\x0e\x01\x01\x03\x1a\x1d#,aM"},
{"crypto/internal/impl", "\xb0\x02"},
{"crypto/internal/randutil", "\xeb\x01\x12"},
- {"crypto/internal/sysrand", "\xd7\x01@\x1b\x01\f\x06"},
- {"crypto/internal/sysrand/internal/seccomp", "n"},
- {"crypto/md5", "\x0e2.\x16\x16`"},
+ {"crypto/internal/sysrand", "mi\"\x1e\r\x0f\x01\x01\v\x06"},
+ {"crypto/internal/sysrand/internal/seccomp", "m"},
+ {"crypto/md5", "\x0e2-\x16\x16a"},
{"crypto/mlkem", "/"},
- {"crypto/pbkdf2", "2\r\x01.\x16"},
- {"crypto/rand", "\x1a\x06\a\x19\x04\x01)}\x0eL"},
- {"crypto/rc4", "#\x1d.\xc1\x01"},
- {"crypto/rsa", "\x0e\f\x01\t\x0f\f\x01\x04\x06\a\x1d\x03\x1325\r\x01"},
- {"crypto/sha1", "\x0e\f&.\x16\x16\x14L"},
- {"crypto/sha256", "\x0e\f\x1aP"},
- {"crypto/sha3", "\x0e'O\xc1\x01"},
- {"crypto/sha512", "\x0e\f\x1cN"},
- {"crypto/subtle", "8\x98\x01T"},
- {"crypto/tls", "\x03\b\x02\x01\x01\x01\x01\x02\x01\x01\x01\x03\x01\a\x01\v\x02\n\x01\b\x05\x03\x01\x01\x01\x01\x02\x01\x02\x01\x18\x02\x03\x13\x16\x14\b5\x16\x16\r\t\x01\x01\x01\x02\x01\f\x06\x02\x01"},
+ {"crypto/pbkdf2", "2\r\x01-\x16"},
+ {"crypto/rand", "\x1a\x06\a\x19\x04\x01(~\x0eL"},
+ {"crypto/rc4", "#\x1d-\xc2\x01"},
+ {"crypto/rsa", "\x0e\f\x01\t\x0f\f\x01\x04\x06\a\x1c\x03\x1326\r\x01"},
+ {"crypto/sha1", "\x0e\f&-\x16\x16\x14M"},
+ {"crypto/sha256", "\x0e\f\x1aO"},
+ {"crypto/sha3", "\x0e'N\xc2\x01"},
+ {"crypto/sha512", "\x0e\f\x1cM"},
+ {"crypto/subtle", "8\x96\x01U"},
+ {"crypto/tls", "\x03\b\x02\x01\x01\x01\x01\x02\x01\x01\x01\x03\x01\a\x01\v\x02\n\x01\b\x05\x03\x01\x01\x01\x01\x02\x01\x02\x01\x17\x02\x03\x13\x16\x14\b6\x16\x15\r\n\x01\x01\x01\x02\x01\f\x06\x02\x01"},
{"crypto/tls/internal/fips140tls", " \x93\x02"},
- {"crypto/x509", "\x03\v\x01\x01\x01\x01\x01\x01\x01\x011\x03\x02\x01\x01\x02\x05\x01\x0e\x06\x02\x02\x03E5\x03\t\x01\x01\x01\a\x10\x05\t\x05\v\x01\x02\r\x02\x01\x01\x02\x03\x01"},
- {"crypto/x509/internal/macos", "\x03k'\x8f\x01\v\x10\x06"},
- {"crypto/x509/pkix", "d\x06\a\x88\x01F"},
- {"database/sql", "\x03\nK\x16\x03z\f\x06\"\x05\t\x02\x03\x01\f\x02\x02\x02"},
- {"database/sql/driver", "\ra\x03\xae\x01\x10\x10"},
- {"debug/buildinfo", "\x03X\x02\x01\x01\b\a\x03`\x18\x02\x01+\x10\x1e"},
- {"debug/dwarf", "\x03d\a\x03z1\x12\x01\x01"},
- {"debug/elf", "\x03\x06Q\r\a\x03`\x19\x01,\x18\x01\x15"},
- {"debug/gosym", "\x03d\n\xbd\x01\x01\x01\x02"},
- {"debug/macho", "\x03\x06Q\r\n`\x1a,\x18\x01"},
- {"debug/pe", "\x03\x06Q\r\a\x03`\x1a,\x18\x01\x15"},
- {"debug/plan9obj", "g\a\x03`\x1a,"},
- {"embed", "n+:\x18\x01S"},
+ {"crypto/x509", "\x03\v\x01\x01\x01\x01\x01\x01\x01\x011\x03\x02\x01\x01\x02\x05\x0e\x06\x02\x02\x03E\x033\x01\x02\t\x01\x01\x01\a\x0f\x05\x01\x06\x02\x05\f\x01\x02\r\x02\x01\x01\x02\x03\x01"},
+ {"crypto/x509/pkix", "c\x06\a\x89\x01F"},
+ {"database/sql", "\x03\nJ\x16\x03{\f\x06!\x05\n\x02\x03\x01\f\x02\x02\x02"},
+ {"database/sql/driver", "\r`\x03\xae\x01\x11\x10"},
+ {"debug/buildinfo", "\x03W\x02\x01\x01\b\a\x03`\x19\x02\x01*\x0f "},
+ {"debug/dwarf", "\x03c\a\x03{0\x13\x01\x01"},
+ {"debug/elf", "\x03\x06P\r\a\x03`\x1a\x01+\x19\x01\x15"},
+ {"debug/gosym", "\x03c\n\xbe\x01\x01\x01\x02"},
+ {"debug/macho", "\x03\x06P\r\n`\x1b+\x19\x01"},
+ {"debug/pe", "\x03\x06P\r\a\x03`\x1b+\x19\x01\x15"},
+ {"debug/plan9obj", "f\a\x03`\x1b+"},
+ {"embed", "m+:\x19\x01S"},
{"embed/internal/embedtest", ""},
{"encoding", ""},
{"encoding/ascii85", "\xeb\x01D"},
- {"encoding/asn1", "\x03k\x03\x87\x01\x01&\x0e\x02\x01\x0f\x03\x01"},
+ {"encoding/asn1", "\x03j\x03\x88\x01\x01%\x0f\x02\x01\x0f\x03\x01"},
{"encoding/base32", "\xeb\x01B\x02"},
- {"encoding/base64", "\x9a\x01QB\x02"},
- {"encoding/binary", "n}\r'\x0e\x05"},
- {"encoding/csv", "\x02\x01k\x03zE\x11\x02"},
- {"encoding/gob", "\x02`\x05\a\x03`\x1a\f\x01\x02\x1d\b\x13\x01\x0e\x02"},
- {"encoding/hex", "n\x03zB\x03"},
- {"encoding/json", "\x03\x01^\x04\b\x03z\r'\x0e\x02\x01\x02\x0f\x01\x01\x02"},
- {"encoding/pem", "\x03c\b}B\x03"},
- {"encoding/xml", "\x02\x01_\f\x03z4\x05\v\x01\x02\x0f\x02"},
- {"errors", "\xca\x01{"},
- {"expvar", "kK9\t\n\x15\r\t\x02\x03\x01\x10"},
- {"flag", "b\f\x03z,\b\x05\t\x02\x01\x0f"},
- {"fmt", "nE8\r\x1f\b\x0e\x02\x03\x11"},
- {"go/ast", "\x03\x01m\x0f\x01j\x03)\b\x0e\x02\x01"},
+ {"encoding/base64", "f\x85\x01B\x02"},
+ {"encoding/binary", "m~\r&\x0f\x05"},
+ {"encoding/csv", "\x02\x01j\x03{E\x11\x02"},
+ {"encoding/gob", "\x02_\x05\a\x03`\x1b\f\x01\x02\x1c\b\x14\x01\x0e\x02"},
+ {"encoding/hex", "m\x03{B\x03"},
+ {"encoding/json", "\x03\x01]\x04\b\x03{\r&\x0f\x02\x01\x02\x0f\x01\x01\x02"},
+ {"encoding/pem", "\x03b\b~B\x03"},
+ {"encoding/xml", "\x02\x01^\f\x03{3\x05\f\x01\x02\x0f\x02"},
+ {"errors", "\xc9\x01|"},
+ {"expvar", "jK:\t\n\x14\r\n\x02\x03\x01\x10"},
+ {"flag", "a\f\x03{+\b\x05\n\x02\x01\x0f"},
+ {"fmt", "mE9\r\x1e\b\x0f\x02\x03\x11"},
+ {"go/ast", "\x03\x01l\x0f\x01k\x03(\b\x0f\x02\x01"},
{"go/ast/internal/tests", ""},
- {"go/build", "\x02\x01k\x03\x01\x03\x02\a\x02\x01\x17\x1e\x04\x02\t\x14\x12\x01+\x01\x04\x01\a\t\x02\x01\x11\x02\x02"},
- {"go/build/constraint", "n\xc1\x01\x01\x11\x02"},
- {"go/constant", "q\x10w\x01\x015\x01\x02\x11"},
- {"go/doc", "\x04m\x01\x06\t=-1\x11\x02\x01\x11\x02"},
- {"go/doc/comment", "\x03n\xbc\x01\x01\x01\x01\x11\x02"},
- {"go/format", "\x03n\x01\f\x01\x02jE"},
- {"go/importer", "t\a\x01\x01\x04\x01i9"},
- {"go/internal/gccgoimporter", "\x02\x01X\x13\x03\x05\v\x01g\x02,\x01\x05\x12\x01\v\b"},
- {"go/internal/gcimporter", "\x02o\x10\x01/\x05\x0e',\x16\x03\x02"},
- {"go/internal/srcimporter", "q\x01\x02\n\x03\x01i,\x01\x05\x13\x02\x13"},
- {"go/parser", "\x03k\x03\x01\x03\v\x01j\x01+\x06\x13"},
- {"go/printer", "q\x01\x03\x03\tj\r\x1f\x16\x02\x01\x02\n\x05\x02"},
- {"go/scanner", "\x03n\x10j2\x11\x01\x12\x02"},
- {"go/token", "\x04m\xbc\x01\x02\x03\x01\x0e\x02"},
- {"go/types", "\x03\x01\x06d\x03\x01\x04\b\x03\x02\x15\x1e\x06+\x04\x03\n%\a\t\x01\x01\x01\x02\x01\x0e\x02\x02"},
- {"go/version", "\xbb\x01u"},
+ {"go/build", "\x02\x01j\x03\x01\x03\x02\a\x02\x01\x17\x1e\x04\x02\t\x14\x13\x01*\x01\x04\x01\a\n\x02\x01\x11\x02\x02"},
+ {"go/build/constraint", "m\xc2\x01\x01\x11\x02"},
+ {"go/constant", "p\x10x\x01\x015\x01\x02\x11"},
+ {"go/doc", "\x04l\x01\x06\t=.0\x12\x02\x01\x11\x02"},
+ {"go/doc/comment", "\x03m\xbd\x01\x01\x01\x01\x11\x02"},
+ {"go/format", "\x03m\x01\f\x01\x02kE"},
+ {"go/importer", "s\a\x01\x01\x04\x01j8"},
+ {"go/internal/gccgoimporter", "\x02\x01W\x13\x03\x05\v\x01h\x02+\x01\x05\x13\x01\v\b"},
+ {"go/internal/gcimporter", "\x02n\x10\x01/\x05\x0e(+\x17\x03\x02"},
+ {"go/internal/srcimporter", "p\x01\x02\n\x03\x01j+\x01\x05\x14\x02\x13"},
+ {"go/parser", "\x03j\x03\x01\x03\v\x01k\x01*\x06\x14"},
+ {"go/printer", "p\x01\x03\x03\tk\r\x1e\x17\x02\x01\x02\n\x05\x02"},
+ {"go/scanner", "\x03m\x10k1\x12\x01\x12\x02"},
+ {"go/token", "\x04l\xbd\x01\x02\x03\x01\x0e\x02"},
+ {"go/types", "\x03\x01\x06c\x03\x01\x04\b\x03\x02\x15\x1e\x06,\x04\x03\n$\a\n\x01\x01\x01\x02\x01\x0e\x02\x02"},
+ {"go/version", "\xba\x01v"},
{"hash", "\xeb\x01"},
- {"hash/adler32", "n\x16\x16"},
- {"hash/crc32", "n\x16\x16\x14\x84\x01\x01"},
- {"hash/crc64", "n\x16\x16\x98\x01"},
- {"hash/fnv", "n\x16\x16`"},
- {"hash/maphash", "\x95\x01\x05\x1b\x03@M"},
+ {"hash/adler32", "m\x16\x16"},
+ {"hash/crc32", "m\x16\x16\x14\x85\x01\x01\x12"},
+ {"hash/crc64", "m\x16\x16\x99\x01"},
+ {"hash/fnv", "m\x16\x16a"},
+ {"hash/maphash", "\x94\x01\x05\x1b\x03AM"},
{"html", "\xb0\x02\x02\x11"},
- {"html/template", "\x03h\x06\x19,5\x01\v \x05\x01\x02\x03\r\x01\x02\v\x01\x03\x02"},
- {"image", "\x02l\x1f^\x0f5\x03\x01"},
+ {"html/template", "\x03g\x06\x19,6\x01\v\x1f\x05\x01\x02\x03\x0e\x01\x02\v\x01\x03\x02"},
+ {"image", "\x02k\x1f_\x0f5\x03\x01"},
{"image/color", ""},
- {"image/color/palette", "\x8d\x01"},
- {"image/draw", "\x8c\x01\x01\x04"},
- {"image/gif", "\x02\x01\x05f\x03\x1b\x01\x01\x01\vQ"},
- {"image/internal/imageutil", "\x8c\x01"},
- {"image/jpeg", "\x02l\x1e\x01\x04Z"},
- {"image/png", "\x02\a^\n\x13\x02\x06\x01^D"},
- {"index/suffixarray", "\x03d\a}\r*\v\x01"},
- {"internal/abi", "\xb5\x01\x90\x01"},
+ {"image/color/palette", "\x8c\x01"},
+ {"image/draw", "\x8b\x01\x01\x04"},
+ {"image/gif", "\x02\x01\x05e\x03\x1b\x01\x01\x01\vR"},
+ {"image/internal/imageutil", "\x8b\x01"},
+ {"image/jpeg", "\x02k\x1e\x01\x04["},
+ {"image/png", "\x02\a]\n\x13\x02\x06\x01_D"},
+ {"index/suffixarray", "\x03c\a~\r)\f\x01"},
+ {"internal/abi", "\xb4\x01\x91\x01"},
{"internal/asan", "\xc5\x02"},
- {"internal/bisect", "\xa4\x02\x0e\x01"},
- {"internal/buildcfg", "qG_\x06\x02\x05\v\x01"},
- {"internal/bytealg", "\xae\x01\x97\x01"},
+ {"internal/bisect", "\xa3\x02\x0f\x01"},
+ {"internal/buildcfg", "pG_\x06\x02\x05\f\x01"},
+ {"internal/bytealg", "\xad\x01\x98\x01"},
{"internal/byteorder", ""},
{"internal/cfg", ""},
- {"internal/chacha8rand", "\x9a\x01\x1b\x90\x01"},
+ {"internal/chacha8rand", "\x99\x01\x1b\x91\x01"},
{"internal/copyright", ""},
{"internal/coverage", ""},
{"internal/coverage/calloc", ""},
- {"internal/coverage/cfile", "k\x06\x17\x16\x01\x02\x01\x01\x01\x01\x01\x01\x01$\x01\x1e,\x06\a\v\x01\x03\f\x06"},
- {"internal/coverage/cformat", "\x04m-\x04I\f6\x01\x02\f"},
- {"internal/coverage/cmerge", "q-Z"},
- {"internal/coverage/decodecounter", "g\n-\v\x02@,\x18\x16"},
- {"internal/coverage/decodemeta", "\x02e\n\x17\x16\v\x02@,"},
- {"internal/coverage/encodecounter", "\x02e\n-\f\x01\x02>\f \x16"},
- {"internal/coverage/encodemeta", "\x02\x01d\n\x13\x04\x16\r\x02>,."},
- {"internal/coverage/pods", "\x04m-y\x06\x05\v\x02\x01"},
+ {"internal/coverage/cfile", "j\x06\x17\x16\x01\x02\x01\x01\x01\x01\x01\x01\x01#\x01 +\x06\a\f\x01\x03\f\x06"},
+ {"internal/coverage/cformat", "\x04l-\x04J\f6\x01\x02\f"},
+ {"internal/coverage/cmerge", "p-["},
+ {"internal/coverage/decodecounter", "f\n-\v\x02A+\x19\x16"},
+ {"internal/coverage/decodemeta", "\x02d\n\x17\x16\v\x02A+"},
+ {"internal/coverage/encodecounter", "\x02d\n-\f\x01\x02?\f\x1f\x17"},
+ {"internal/coverage/encodemeta", "\x02\x01c\n\x13\x04\x16\r\x02?+/"},
+ {"internal/coverage/pods", "\x04l-y\x06\x05\f\x02\x01"},
{"internal/coverage/rtcov", "\xc5\x02"},
- {"internal/coverage/slicereader", "g\nzZ"},
- {"internal/coverage/slicewriter", "qz"},
- {"internal/coverage/stringtab", "q8\x04>"},
+ {"internal/coverage/slicereader", "f\n{Z"},
+ {"internal/coverage/slicewriter", "p{"},
+ {"internal/coverage/stringtab", "p8\x04?"},
{"internal/coverage/test", ""},
{"internal/coverage/uleb128", ""},
{"internal/cpu", "\xc5\x02"},
- {"internal/dag", "\x04m\xbc\x01\x03"},
- {"internal/diff", "\x03n\xbd\x01\x02"},
- {"internal/exportdata", "\x02\x01k\x03\x03]\x1a,\x01\x05\x12\x01\x02"},
- {"internal/filepathlite", "n+:\x19A"},
- {"internal/fmtsort", "\x04\x9b\x02\x0e"},
- {"internal/fuzz", "\x03\nA\x19\x04\x03\x03\x01\f\x0355\r\x02\x1d\x01\x05\x02\x05\v\x01\x02\x01\x01\v\x04\x02"},
+ {"internal/dag", "\x04l\xbd\x01\x03"},
+ {"internal/diff", "\x03m\xbe\x01\x02"},
+ {"internal/exportdata", "\x02\x01j\x03\x03]\x1b+\x01\x05\x13\x01\x02"},
+ {"internal/filepathlite", "m+:\x1aA"},
+ {"internal/fmtsort", "\x04\x9a\x02\x0f"},
+ {"internal/fuzz", "\x03\nA\x18\x04\x03\x03\x01\f\x0356\r\x02\x1c\x01\x05\x02\x05\f\x01\x02\x01\x01\v\x04\x02"},
{"internal/goarch", ""},
- {"internal/godebug", "\x97\x01 {\x01\x12"},
+ {"internal/godebug", "\x96\x01 |\x01\x12"},
{"internal/godebugs", ""},
{"internal/goexperiment", ""},
{"internal/goos", ""},
- {"internal/goroot", "\x97\x02\x01\x05\x13\x02"},
+ {"internal/goroot", "\x96\x02\x01\x05\x14\x02"},
{"internal/gover", "\x04"},
{"internal/goversion", ""},
{"internal/itoa", ""},
- {"internal/lazyregexp", "\x97\x02\v\x0e\x02"},
- {"internal/lazytemplate", "\xeb\x01,\x19\x02\v"},
+ {"internal/lazyregexp", "\x96\x02\v\x0f\x02"},
+ {"internal/lazytemplate", "\xeb\x01+\x1a\x02\v"},
{"internal/msan", "\xc5\x02"},
{"internal/nettrace", ""},
- {"internal/obscuretestdata", "f\x85\x01,"},
- {"internal/oserror", "n"},
- {"internal/pkgbits", "\x03K\x19\a\x03\x05\vj\x0e\x1e\r\v\x01"},
+ {"internal/obscuretestdata", "e\x86\x01+"},
+ {"internal/oserror", "m"},
+ {"internal/pkgbits", "\x03K\x18\a\x03\x05\vk\x0e\x1d\r\f\x01"},
{"internal/platform", ""},
- {"internal/poll", "nO\x1a\x149\x0e\x01\x01\v\x06"},
- {"internal/profile", "\x03\x04g\x03z7\f\x01\x01\x0f"},
+ {"internal/poll", "mO\x1a\x158\x0f\x01\x01\v\x06"},
+ {"internal/profile", "\x03\x04f\x03{6\r\x01\x01\x0f"},
{"internal/profilerecord", ""},
- {"internal/race", "\x95\x01\xb0\x01"},
- {"internal/reflectlite", "\x95\x01 3+\x1a\x02"},
{"internal/syslist", ""},
- {"internal/testenv", "\x03\na\x02\x01*\x1a\x10'+\x01\x05\a\v\x01\x02\x02\x01\n"},
+ {"internal/testenv", "\x03\n`\x02\x01*\x1a\x10(*\x01\x05\a\f\x01\x02\x02\x01\n"},
{"internal/testlog", "\xb2\x02\x01\x12"},
- {"internal/testpty", "n\x03f@\x1d"},
- {"internal/trace", "\x02\x01\x01\x06]\a\x03n\x03\x03\x06\x03\n5\x01\x02\x0f\x06"},
- {"internal/trace/internal/testgen", "\x03d\nl\x03\x02\x03\x011\v\x0e"},
- {"internal/trace/internal/tracev1", "\x03\x01c\a\x03t\x06\r5\x01"},
- {"internal/trace/raw", "\x02e\nq\x03\x06D\x01\x11"},
- {"internal/trace/testtrace", "\x02\x01k\x03l\x03\x06\x057\v\x02\x01"},
- {"internal/trace/tracev2", ""},
- {"internal/trace/traceviewer", "\x02^\v\x06\x1a<\x16\a\a\x04\t\n\x15\x01\x05\a\v\x01\x02\r"},
+ {"internal/testpty", "m\x03\xa6\x01"},
+ {"internal/trace", "\x02\x01\x01\x06\\\a\x03m\x01\x01\x06\x06\x03\n5\x01\x02\x0f"},
+ {"internal/trace/event", ""},
+ {"internal/trace/event/go122", "pm"},
+ {"internal/trace/internal/oldtrace", "\x03\x01b\a\x03m\b\x06\r5\x01"},
+ {"internal/trace/internal/testgen/go122", "\x03c\nl\x01\x01\x03\x04\x010\v\x0f"},
+ {"internal/trace/raw", "\x02d\nm\b\x06D\x01\x11"},
+ {"internal/trace/testtrace", "\x02\x01j\x03l\x05\x05\x056\f\x02\x01"},
+ {"internal/trace/traceviewer", "\x02]\v\x06\x1a<\x16\b\a\x04\t\n\x14\x01\x05\a\f\x01\x02\r"},
{"internal/trace/traceviewer/format", ""},
- {"internal/trace/version", "qq\t"},
- {"internal/txtar", "\x03n\xa6\x01\x19"},
+ {"internal/trace/version", "pm\x01\r"},
+ {"internal/txtar", "\x03m\xa6\x01\x1a"},
{"internal/types/errors", "\xaf\x02"},
{"internal/unsafeheader", "\xc5\x02"},
- {"internal/xcoff", "Z\r\a\x03`\x1a,\x18\x01"},
- {"internal/zstd", "g\a\x03z\x0f"},
- {"io", "n\xc4\x01"},
- {"io/fs", "n+*(1\x11\x12\x04"},
- {"io/ioutil", "\xeb\x01\x01+\x16\x03"},
- {"iter", "\xc9\x01[!"},
- {"log", "qz\x05'\r\x0e\x01\f"},
+ {"internal/xcoff", "Y\r\a\x03`\x1b+\x19\x01"},
+ {"internal/zstd", "f\a\x03{\x0f"},
+ {"io", "m\xc5\x01"},
+ {"io/fs", "m+*)0\x12\x12\x04"},
+ {"io/ioutil", "\xeb\x01\x01*\x17\x03"},
+ {"iter", "\xc8\x01[\""},
+ {"log", "p{\x05&\r\x0f\x01\f"},
{"log/internal", ""},
- {"log/slog", "\x03\nU\t\x03\x03z\x04\x01\x02\x02\x04'\x05\t\x02\x01\x02\x01\f\x02\x02\x02"},
+ {"log/slog", "\x03\nT\t\x03\x03{\x04\x01\x02\x02\x04&\x05\n\x02\x01\x02\x01\f\x02\x02\x02"},
{"log/slog/internal", ""},
- {"log/slog/internal/benchmarks", "\ra\x03z\x06\x03;\x10"},
+ {"log/slog/internal/benchmarks", "\r`\x03{\x06\x03;\x10"},
{"log/slog/internal/buffer", "\xb2\x02"},
{"log/slog/internal/slogtest", "\xf1\x01"},
- {"log/syslog", "n\x03~\x12\x16\x19\x02\r"},
+ {"log/syslog", "m\x03\x7f\x12\x15\x1a\x02\r"},
{"maps", "\xee\x01W"},
- {"math", "\xfa\x01K"},
- {"math/big", "\x03k\x03)Q\r\x02\x021\x02\x01\x02\x13"},
+ {"math", "\xad\x01MK"},
+ {"math/big", "\x03j\x03)\x14>\r\x02\x023\x01\x02\x13"},
{"math/bits", "\xc5\x02"},
{"math/cmplx", "\xf8\x01\x02"},
- {"math/rand", "\xb6\x01B:\x01\x12"},
- {"math/rand/v2", "n,\x02\\\x02K"},
- {"mime", "\x02\x01c\b\x03z\f \x16\x03\x02\x0f\x02"},
- {"mime/multipart", "\x02\x01G$\x03E5\f\x01\x06\x02\x15\x02\x06\x10\x02\x01\x15"},
- {"mime/quotedprintable", "\x02\x01nz"},
- {"net", "\x04\ta+\x1d\a\x04\x05\x05\a\x01\x04\x14\x01%\x06\r\t\x05\x01\x01\v\x06\a"},
- {"net/http", "\x02\x01\x04\x04\x02=\b\x14\x01\a\x03E5\x01\x03\b\x01\x02\x02\x02\x01\x02\x06\x02\x01\x01\n\x01\x01\x05\x01\x02\x05\t\x01\x01\x01\x02\x01\f\x02\x02\x02\b\x01\x01\x01"},
- {"net/http/cgi", "\x02P\x1c\x03z\x04\b\n\x01\x13\x01\x01\x01\x04\x01\x05\x02\t\x02\x01\x0f\x0e"},
- {"net/http/cookiejar", "\x04j\x03\x90\x01\x01\b\f\x17\x03\x02\r\x04"},
- {"net/http/fcgi", "\x02\x01\nZ\a\x03z\x16\x01\x01\x14\x19\x02\r"},
- {"net/http/httptest", "\x02\x01\nE\x02\x1c\x01z\x04\x12\x01\n\t\x02\x18\x01\x02\r\x0e"},
- {"net/http/httptrace", "\rEo@\x14\n "},
- {"net/http/httputil", "\x02\x01\na\x03z\x04\x0f\x03\x01\x05\x02\x01\v\x01\x1a\x02\r\x0e"},
- {"net/http/internal", "\x02\x01k\x03z"},
+ {"math/rand", "\xb5\x01C:\x01\x12"},
+ {"math/rand/v2", "m,\x02]\x02K"},
+ {"mime", "\x02\x01b\b\x03{\f\x1f\x17\x03\x02\x0f\x02"},
+ {"mime/multipart", "\x02\x01G#\x03E6\f\x01\x06\x02\x14\x02\x06\x11\x02\x01\x15"},
+ {"mime/quotedprintable", "\x02\x01m{"},
+ {"net", "\x04\t`+\x1d\a\x04\x05\f\x01\x04\x15\x01$\x06\r\n\x05\x01\x01\v\x06\a"},
+ {"net/http", "\x02\x01\x04\x04\x02=\b\x13\x01\a\x03E6\x01\x03\b\x01\x02\x02\x02\x01\x02\x06\x02\x01\n\x01\x01\x05\x01\x02\x05\n\x01\x01\x01\x02\x01\f\x02\x02\x02\b\x01\x01\x01"},
+ {"net/http/cgi", "\x02P\x1b\x03{\x04\b\n\x01\x12\x01\x01\x01\x04\x01\x05\x02\n\x02\x01\x0f\x0e"},
+ {"net/http/cookiejar", "\x04i\x03\x91\x01\x01\b\v\x18\x03\x02\r\x04"},
+ {"net/http/fcgi", "\x02\x01\nY\a\x03{\x16\x01\x01\x13\x1a\x02\r"},
+ {"net/http/httptest", "\x02\x01\nE\x02\x1b\x01{\x04\x12\x01\t\t\x02\x19\x01\x02\r\x0e"},
+ {"net/http/httptrace", "\rEnA\x13\n!"},
+ {"net/http/httputil", "\x02\x01\n`\x03{\x04\x0f\x03\x01\x05\x02\x01\n\x01\x1b\x02\r\x0e"},
+ {"net/http/internal", "\x02\x01j\x03{"},
{"net/http/internal/ascii", "\xb0\x02\x11"},
- {"net/http/internal/httpcommon", "\ra\x03\x96\x01\x0e\x01\x18\x01\x01\x02\x1b\x02"},
{"net/http/internal/testcert", "\xb0\x02"},
- {"net/http/pprof", "\x02\x01\nd\x19,\x11$\x04\x13\x14\x01\r\x06\x02\x01\x02\x01\x0f"},
- {"net/internal/cgotest", "\xd7\x01n"},
- {"net/internal/socktest", "q\xc1\x01\x02"},
- {"net/mail", "\x02l\x03z\x04\x0f\x03\x14\x1b\x02\r\x04"},
- {"net/netip", "\x04j+\x01#;\x025\x15"},
- {"net/rpc", "\x02g\x05\x03\x10\n`\x04\x12\x01\x1d\x0e\x03\x02"},
- {"net/rpc/jsonrpc", "k\x03\x03z\x16\x11 "},
- {"net/smtp", "\x19.\v\x14\b\x03z\x16\x14\x1b"},
- {"net/textproto", "\x02\x01k\x03z\r\t.\x01\x02\x13"},
- {"net/url", "n\x03\x86\x01%\x11\x02\x01\x15"},
- {"os", "n+\x19\v\t\r\x03\x01\x04\x10\x018\t\x05\x01\x01\v\x06"},
- {"os/exec", "\x03\naH \x01\x14\x01+\x06\a\v\x01\x04\v"},
+ {"net/http/pprof", "\x02\x01\nc\x19,\x11%\x04\x13\x13\x01\r\x06\x03\x01\x02\x01\x0f"},
+ {"net/internal/cgotest", ""},
+ {"net/internal/socktest", "p\xc2\x01\x02"},
+ {"net/mail", "\x02k\x03{\x04\x0f\x03\x13\x1c\x02\r\x04"},
+ {"net/netip", "\x04i+\x01#<\x025\x15"},
+ {"net/rpc", "\x02f\x05\x03\x10\na\x04\x12\x01\x1c\x0f\x03\x02"},
+ {"net/rpc/jsonrpc", "j\x03\x03{\x16\x10!"},
+ {"net/smtp", "\x19.\v\x13\b\x03{\x16\x13\x1c"},
+ {"net/textproto", "\x02\x01j\x03{\r\t.\x01\x02\x13"},
+ {"net/url", "m\x03\x87\x01$\x12\x02\x01\x15"},
+ {"os", "m+\x01\x18\x03\b\t\r\x03\x01\x04\x11\x017\n\x05\x01\x01\v\x06"},
+ {"os/exec", "\x03\n`H \x01\x15\x01*\x06\a\f\x01\x04\v"},
{"os/exec/internal/fdtest", "\xb4\x02"},
- {"os/signal", "\r\x8a\x02\x16\x05\x02"},
- {"os/user", "qfM\v\x01\x02\x02\x11"},
- {"path", "n+\xaa\x01"},
- {"path/filepath", "n+\x19:+\r\t\x03\x04\x0f"},
- {"plugin", "n\xc4\x01\x13"},
- {"reflect", "n'\x04\x1c\b\f\x05\x02\x18\x06\n,\v\x03\x0f\x02\x02"},
+ {"os/signal", "\r\x89\x02\x17\x05\x02"},
+ {"os/user", "\x02\x01j\x03{+\r\f\x01\x02"},
+ {"path", "m+\xab\x01"},
+ {"path/filepath", "m+\x19;*\r\n\x03\x04\x0f"},
+ {"plugin", "m"},
+ {"reflect", "m'\x04\x1c\b\f\x04\x02\x1a\x06\n+\f\x03\x0f\x02\x02"},
{"reflect/internal/example1", ""},
{"reflect/internal/example2", ""},
- {"regexp", "\x03\xe8\x018\n\x02\x01\x02\x0f\x02"},
+ {"regexp", "\x03\xe8\x017\v\x02\x01\x02\x0f\x02"},
{"regexp/syntax", "\xad\x02\x01\x01\x01\x11\x02"},
- {"runtime", "\x95\x01\x04\x01\x02\f\x06\a\x02\x01\x01\x0f\x04\x01\x01\x01\x01\x03\x0fc"},
- {"runtime/cgo", "\xd0\x01b\x01\x12"},
- {"runtime/coverage", "\xa0\x01K"},
- {"runtime/debug", "qUQ\r\t\x02\x01\x0f\x06"},
+ {"runtime", "\x94\x01\x04\x01\x02\f\x06\a\x02\x01\x01\x0f\x03\x01\x01\x01\x01\x01\x03s"},
+ {"runtime/coverage", "\x9f\x01L"},
+ {"runtime/debug", "pUQ\r\n\x02\x01\x0f\x06"},
+ {"runtime/internal/startlinetest", ""},
{"runtime/internal/wasitest", ""},
- {"runtime/metrics", "\xb7\x01A,!"},
- {"runtime/pprof", "\x02\x01\x01\x03\x06Z\a\x03$3#\r\x1f\r\t\x01\x01\x01\x02\x02\b\x03\x06"},
- {"runtime/race", ""},
- {"runtime/trace", "\rdz9\x0e\x01\x12"},
+ {"runtime/metrics", "\xb6\x01B+\""},
+ {"runtime/pprof", "\x02\x01\x01\x03\x06Y\a\x03$3$\r\x1e\r\n\x01\x01\x01\x02\x02\b\x03\x06"},
+ {"runtime/race", "\xab\x02"},
+ {"runtime/race/internal/amd64v1", ""},
+ {"runtime/trace", "\rc{8\x0f\x01\x12"},
{"slices", "\x04\xea\x01\fK"},
- {"sort", "\xca\x0103"},
- {"strconv", "n+:%\x02I"},
- {"strings", "n'\x04:\x18\x03\f8\x0f\x02\x02"},
+ {"sort", "\xc9\x0113"},
+ {"strconv", "m+:&\x02I"},
+ {"strings", "m'\x04:\x19\x03\f8\x0f\x02\x02"},
{"structs", ""},
- {"sync", "\xc9\x01\vP\x0f\x12"},
+ {"sync", "\xc8\x01\vP\x10\x12"},
{"sync/atomic", "\xc5\x02"},
- {"syscall", "n'\x01\x03\x01\x1b\b\x03\x03\x06[\x0e\x01\x12"},
- {"testing", "\x03\na\x02\x01X\x0f\x13\r\x04\x1b\x06\x02\x05\x03\x05\x01\x02\x01\x02\x01\f\x02\x02\x02"},
- {"testing/fstest", "n\x03z\x01\v%\x11\x03\b\a"},
- {"testing/internal/testdeps", "\x02\v\xa7\x01'\x10,\x03\x05\x03\b\x06\x02\r"},
- {"testing/iotest", "\x03k\x03z\x04"},
- {"testing/quick", "p\x01\x87\x01\x04#\x11\x0f"},
- {"testing/slogtest", "\ra\x03\x80\x01.\x05\x11\n"},
- {"text/scanner", "\x03nz,*\x02"},
- {"text/tabwriter", "qzX"},
- {"text/template", "n\x03B8\x01\v\x1f\x01\x05\x01\x02\x05\f\x02\f\x03\x02"},
- {"text/template/parse", "\x03n\xb3\x01\v\x01\x11\x02"},
- {"time", "n+\x1d\x1d'*\x0e\x02\x11"},
- {"time/tzdata", "n\xc6\x01\x11"},
+ {"syscall", "m(\x03\x01\x1b\b\x03\x03\x06\aT\x0f\x01\x12"},
+ {"testing", "\x03\n`\x02\x01G\x11\x0f\x14\r\x04\x1a\x06\x02\x05\x02\a\x01\x02\x01\x02\x01\f\x02\x02\x02"},
+ {"testing/fstest", "m\x03{\x01\v$\x12\x03\b\a"},
+ {"testing/internal/testdeps", "\x02\v\xa6\x01'\x11+\x03\x05\x03\b\a\x02\r"},
+ {"testing/iotest", "\x03j\x03{\x04"},
+ {"testing/quick", "o\x01\x88\x01\x04\"\x12\x0f"},
+ {"testing/slogtest", "\r`\x03\x81\x01-\x05\x12\n"},
+ {"text/scanner", "\x03m{++\x02"},
+ {"text/tabwriter", "p{X"},
+ {"text/template", "m\x03B9\x01\v\x1e\x01\x05\x01\x02\x05\r\x02\f\x03\x02"},
+ {"text/template/parse", "\x03m\xb3\x01\f\x01\x11\x02"},
+ {"time", "m+\x1d\x1d()\x0f\x02\x11"},
+ {"time/tzdata", "m\xc7\x01\x11"},
{"unicode", ""},
{"unicode/utf16", ""},
{"unicode/utf8", ""},
- {"unique", "\x95\x01>\x01P\x0e\x13\x12"},
+ {"unique", "\x94\x01>\x01P\x0f\x13\x12"},
{"unsafe", ""},
- {"vendor/golang.org/x/crypto/chacha20", "\x10W\a\x8c\x01*&"},
- {"vendor/golang.org/x/crypto/chacha20poly1305", "\x10W\a\xd8\x01\x04\x01"},
- {"vendor/golang.org/x/crypto/cryptobyte", "d\n\x03\x88\x01& \n"},
+ {"vendor/golang.org/x/crypto/chacha20", "\x10V\a\x8d\x01)'"},
+ {"vendor/golang.org/x/crypto/chacha20poly1305", "\x10V\a\xd9\x01\x04\x01\a"},
+ {"vendor/golang.org/x/crypto/cryptobyte", "c\n\x03\x89\x01%!\n"},
{"vendor/golang.org/x/crypto/cryptobyte/asn1", ""},
{"vendor/golang.org/x/crypto/internal/alias", "\xc5\x02"},
- {"vendor/golang.org/x/crypto/internal/poly1305", "Q\x16\x93\x01"},
- {"vendor/golang.org/x/net/dns/dnsmessage", "n"},
- {"vendor/golang.org/x/net/http/httpguts", "\x81\x02\x14\x1b\x13\r"},
- {"vendor/golang.org/x/net/http/httpproxy", "n\x03\x90\x01\x15\x01\x19\x13\r"},
- {"vendor/golang.org/x/net/http2/hpack", "\x03k\x03zG"},
- {"vendor/golang.org/x/net/idna", "q\x87\x018\x13\x10\x02\x01"},
- {"vendor/golang.org/x/net/nettest", "\x03d\a\x03z\x11\x05\x16\x01\f\v\x01\x02\x02\x01\n"},
- {"vendor/golang.org/x/sys/cpu", "\x97\x02\r\v\x01\x15"},
- {"vendor/golang.org/x/text/secure/bidirule", "n\xd5\x01\x11\x01"},
- {"vendor/golang.org/x/text/transform", "\x03k}X"},
- {"vendor/golang.org/x/text/unicode/bidi", "\x03\bf~?\x15"},
- {"vendor/golang.org/x/text/unicode/norm", "g\nzG\x11\x11"},
- {"weak", "\x95\x01\x8f\x01!"},
+ {"vendor/golang.org/x/crypto/internal/poly1305", "Q\x15\x94\x01"},
+ {"vendor/golang.org/x/net/dns/dnsmessage", "m"},
+ {"vendor/golang.org/x/net/http/httpguts", "\x81\x02\x13\x1c\x13\r"},
+ {"vendor/golang.org/x/net/http/httpproxy", "m\x03\x91\x01\x0f\x05\x01\x1a\x13\r"},
+ {"vendor/golang.org/x/net/http2/hpack", "\x03j\x03{G"},
+ {"vendor/golang.org/x/net/idna", "p\x88\x018\x13\x10\x02\x01"},
+ {"vendor/golang.org/x/net/nettest", "\x03c\a\x03{\x11\x05\x15\x01\f\f\x01\x02\x02\x01\n"},
+ {"vendor/golang.org/x/sys/cpu", "\x96\x02\r\f\x01\x15"},
+ {"vendor/golang.org/x/text/secure/bidirule", "m\xd6\x01\x11\x01"},
+ {"vendor/golang.org/x/text/transform", "\x03j~X"},
+ {"vendor/golang.org/x/text/unicode/bidi", "\x03\be\x7f?\x15"},
+ {"vendor/golang.org/x/text/unicode/norm", "f\n{G\x11\x11"},
+ {"weak", "\x94\x01\x8f\x01\""},
}
diff --git a/vendor/golang.org/x/tools/internal/stdlib/manifest.go b/vendor/golang.org/x/tools/internal/stdlib/manifest.go
index 00776a31b6..2b418796ab 100644
--- a/vendor/golang.org/x/tools/internal/stdlib/manifest.go
+++ b/vendor/golang.org/x/tools/internal/stdlib/manifest.go
@@ -7119,7 +7119,6 @@ var PackageSymbols = map[string][]Symbol{
{"FormatFileInfo", Func, 21},
{"Glob", Func, 16},
{"GlobFS", Type, 16},
- {"Lstat", Func, 25},
{"ModeAppend", Const, 16},
{"ModeCharDevice", Const, 16},
{"ModeDevice", Const, 16},
@@ -7144,8 +7143,6 @@ var PackageSymbols = map[string][]Symbol{
{"ReadDirFile", Type, 16},
{"ReadFile", Func, 16},
{"ReadFileFS", Type, 16},
- {"ReadLink", Func, 25},
- {"ReadLinkFS", Type, 25},
{"SkipAll", Var, 20},
{"SkipDir", Var, 16},
{"Stat", Func, 16},
@@ -9149,8 +9146,6 @@ var PackageSymbols = map[string][]Symbol{
{"(*ProcessState).SysUsage", Method, 0},
{"(*ProcessState).SystemTime", Method, 0},
{"(*ProcessState).UserTime", Method, 0},
- {"(*Root).Chmod", Method, 25},
- {"(*Root).Chown", Method, 25},
{"(*Root).Close", Method, 24},
{"(*Root).Create", Method, 24},
{"(*Root).FS", Method, 24},
@@ -16759,11 +16754,9 @@ var PackageSymbols = map[string][]Symbol{
},
"testing/fstest": {
{"(MapFS).Glob", Method, 16},
- {"(MapFS).Lstat", Method, 25},
{"(MapFS).Open", Method, 16},
{"(MapFS).ReadDir", Method, 16},
{"(MapFS).ReadFile", Method, 16},
- {"(MapFS).ReadLink", Method, 25},
{"(MapFS).Stat", Method, 16},
{"(MapFS).Sub", Method, 16},
{"MapFS", Type, 16},
diff --git a/vendor/golang.org/x/tools/internal/typeparams/free.go b/vendor/golang.org/x/tools/internal/typeparams/free.go
index 0ade5c2949..709d2fc144 100644
--- a/vendor/golang.org/x/tools/internal/typeparams/free.go
+++ b/vendor/golang.org/x/tools/internal/typeparams/free.go
@@ -70,7 +70,7 @@ func (w *Free) Has(typ types.Type) (res bool) {
case *types.Tuple:
n := t.Len()
- for i := 0; i < n; i++ {
+ for i := range n {
if w.Has(t.At(i).Type()) {
return true
}
diff --git a/vendor/golang.org/x/tools/internal/typeparams/termlist.go b/vendor/golang.org/x/tools/internal/typeparams/termlist.go
index cbd12f8013..9bc29143f6 100644
--- a/vendor/golang.org/x/tools/internal/typeparams/termlist.go
+++ b/vendor/golang.org/x/tools/internal/typeparams/termlist.go
@@ -1,3 +1,6 @@
+// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/termlist.go
+
// Copyright 2021 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
@@ -7,8 +10,8 @@
package typeparams
import (
- "bytes"
"go/types"
+ "strings"
)
// A termlist represents the type set represented by the union
@@ -22,15 +25,18 @@ type termlist []*term
// It is in normal form.
var allTermlist = termlist{new(term)}
+// termSep is the separator used between individual terms.
+const termSep = " | "
+
// String prints the termlist exactly (without normalization).
func (xl termlist) String() string {
if len(xl) == 0 {
return "∅"
}
- var buf bytes.Buffer
+ var buf strings.Builder
for i, x := range xl {
if i > 0 {
- buf.WriteString(" | ")
+ buf.WriteString(termSep)
}
buf.WriteString(x.String())
}
diff --git a/vendor/golang.org/x/tools/internal/typeparams/typeterm.go b/vendor/golang.org/x/tools/internal/typeparams/typeterm.go
index 7350bb702a..fa758cdc98 100644
--- a/vendor/golang.org/x/tools/internal/typeparams/typeterm.go
+++ b/vendor/golang.org/x/tools/internal/typeparams/typeterm.go
@@ -1,3 +1,6 @@
+// Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
+// Source: ../../cmd/compile/internal/types2/typeterm.go
+
// Copyright 2021 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
diff --git a/vendor/golang.org/x/tools/internal/typesinternal/classify_call.go b/vendor/golang.org/x/tools/internal/typesinternal/classify_call.go
new file mode 100644
index 0000000000..649c82b6be
--- /dev/null
+++ b/vendor/golang.org/x/tools/internal/typesinternal/classify_call.go
@@ -0,0 +1,135 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package typesinternal
+
+import (
+ "fmt"
+ "go/ast"
+ "go/types"
+ _ "unsafe"
+)
+
+// CallKind describes the function position of an [*ast.CallExpr].
+type CallKind int
+
+const (
+ CallStatic CallKind = iota // static call to known function
+ CallInterface // dynamic call through an interface method
+ CallDynamic // dynamic call of a func value
+ CallBuiltin // call to a builtin function
+ CallConversion // a conversion (not a call)
+)
+
+var callKindNames = []string{
+ "CallStatic",
+ "CallInterface",
+ "CallDynamic",
+ "CallBuiltin",
+ "CallConversion",
+}
+
+func (k CallKind) String() string {
+ if i := int(k); i >= 0 && i < len(callKindNames) {
+ return callKindNames[i]
+ }
+ return fmt.Sprintf("typeutil.CallKind(%d)", k)
+}
+
+// ClassifyCall classifies the function position of a call expression ([*ast.CallExpr]).
+// It distinguishes among true function calls, calls to builtins, and type conversions,
+// and further classifies function calls as static calls (where the function is known),
+// dynamic interface calls, and other dynamic calls.
+//
+// For the declarations:
+//
+// func f() {}
+// func g[T any]() {}
+// var v func()
+// var s []func()
+// type I interface { M() }
+// var i I
+//
+// ClassifyCall returns the following:
+//
+// f() CallStatic
+// g[int]() CallStatic
+// i.M() CallInterface
+// min(1, 2) CallBuiltin
+// v() CallDynamic
+// s[0]() CallDynamic
+// int(x) CallConversion
+// []byte("") CallConversion
+func ClassifyCall(info *types.Info, call *ast.CallExpr) CallKind {
+ if info.Types == nil {
+ panic("ClassifyCall: info.Types is nil")
+ }
+ if info.Types[call.Fun].IsType() {
+ return CallConversion
+ }
+ obj := info.Uses[UsedIdent(info, call.Fun)]
+ // Classify the call by the type of the object, if any.
+ switch obj := obj.(type) {
+ case *types.Builtin:
+ return CallBuiltin
+ case *types.Func:
+ if interfaceMethod(obj) {
+ return CallInterface
+ }
+ return CallStatic
+ default:
+ return CallDynamic
+ }
+}
+
+// UsedIdent returns the identifier such that info.Uses[UsedIdent(info, e)]
+// is the [types.Object] used by e, if any.
+//
+// If e is one of various forms of reference:
+//
+// f, c, v, T lexical reference
+// pkg.X qualified identifier
+// f[T] or pkg.F[K,V] instantiations of the above kinds
+// expr.f field or method value selector
+// T.f method expression selector
+//
+// UsedIdent returns the identifier whose is associated value in [types.Info.Uses]
+// is the object to which it refers.
+//
+// For the declarations:
+//
+// func F[T any] {...}
+// type I interface { M() }
+// var (
+// x int
+// s struct { f int }
+// a []int
+// i I
+// )
+//
+// UsedIdent returns the following:
+//
+// Expr UsedIdent
+// x x
+// s.f f
+// F[int] F
+// i.M M
+// I.M M
+// min min
+// int int
+// 1 nil
+// a[0] nil
+// []byte nil
+//
+// Note: if e is an instantiated function or method, UsedIdent returns
+// the corresponding generic function or method on the generic type.
+func UsedIdent(info *types.Info, e ast.Expr) *ast.Ident {
+ return usedIdent(info, e)
+}
+
+//go:linkname usedIdent golang.org/x/tools/go/types/typeutil.usedIdent
+func usedIdent(info *types.Info, e ast.Expr) *ast.Ident
+
+//go:linkname interfaceMethod golang.org/x/tools/go/types/typeutil.interfaceMethod
+func interfaceMethod(f *types.Func) bool
diff --git a/vendor/golang.org/x/tools/internal/typesinternal/types.go b/vendor/golang.org/x/tools/internal/typesinternal/types.go
index edf0347ec3..cc244689ef 100644
--- a/vendor/golang.org/x/tools/internal/typesinternal/types.go
+++ b/vendor/golang.org/x/tools/internal/typesinternal/types.go
@@ -7,6 +7,7 @@
package typesinternal
import (
+ "go/ast"
"go/token"
"go/types"
"reflect"
@@ -127,3 +128,17 @@ func Origin(t NamedOrAlias) NamedOrAlias {
func IsPackageLevel(obj types.Object) bool {
return obj.Pkg() != nil && obj.Parent() == obj.Pkg().Scope()
}
+
+// NewTypesInfo returns a *types.Info with all maps populated.
+func NewTypesInfo() *types.Info {
+ return &types.Info{
+ Types: map[ast.Expr]types.TypeAndValue{},
+ Instances: map[*ast.Ident]types.Instance{},
+ Defs: map[*ast.Ident]types.Object{},
+ Uses: map[*ast.Ident]types.Object{},
+ Implicits: map[ast.Node]types.Object{},
+ Selections: map[*ast.SelectorExpr]*types.Selection{},
+ Scopes: map[ast.Node]*types.Scope{},
+ FileVersions: map[*ast.File]string{},
+ }
+}
diff --git a/vendor/modules.txt b/vendor/modules.txt
index b7e3e90ae8..2a1593dd78 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -17,7 +17,7 @@ github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime
github.com/Azure/azure-sdk-for-go/sdk/azcore/streaming
github.com/Azure/azure-sdk-for-go/sdk/azcore/to
github.com/Azure/azure-sdk-for-go/sdk/azcore/tracing
-# github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.0
+# github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.1
## explicit; go 1.23.0
github.com/Azure/azure-sdk-for-go/sdk/internal/diag
github.com/Azure/azure-sdk-for-go/sdk/internal/errorinfo
@@ -61,7 +61,7 @@ github.com/CortexFoundation/robot/backend
# github.com/CortexFoundation/statik v0.0.0-20210315012922-8bb8a7b5dc66
## explicit; go 1.16
github.com/CortexFoundation/statik
-# github.com/CortexFoundation/torrentfs v1.0.69-0.20250403225800-b711a7505432
+# github.com/CortexFoundation/torrentfs v1.0.69-0.20250413152926-abb59313c23c
## explicit; go 1.23.4
github.com/CortexFoundation/torrentfs
github.com/CortexFoundation/torrentfs/backend
@@ -154,7 +154,7 @@ github.com/anacrolix/stm/stmutil
# github.com/anacrolix/sync v0.5.3
## explicit; go 1.13
github.com/anacrolix/sync
-# github.com/anacrolix/torrent v1.58.2-0.20250318232932-3a656a26676c
+# github.com/anacrolix/torrent v1.58.2-0.20250409094824-b85facb2e9a7
## explicit; go 1.23
github.com/anacrolix/torrent
github.com/anacrolix/torrent/analysis
@@ -237,10 +237,10 @@ github.com/aws/aws-sdk-go-v2/internal/shareddefaults
github.com/aws/aws-sdk-go-v2/internal/strings
github.com/aws/aws-sdk-go-v2/internal/sync/singleflight
github.com/aws/aws-sdk-go-v2/internal/timeconv
-# github.com/aws/aws-sdk-go-v2/config v1.29.13
+# github.com/aws/aws-sdk-go-v2/config v1.29.14
## explicit; go 1.22
github.com/aws/aws-sdk-go-v2/config
-# github.com/aws/aws-sdk-go-v2/credentials v1.17.66
+# github.com/aws/aws-sdk-go-v2/credentials v1.17.67
## explicit; go 1.22
github.com/aws/aws-sdk-go-v2/credentials
github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds
@@ -268,7 +268,7 @@ github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding
# github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15
## explicit; go 1.22
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url
-# github.com/aws/aws-sdk-go-v2/service/route53 v1.51.0
+# github.com/aws/aws-sdk-go-v2/service/route53 v1.51.1
## explicit; go 1.22
github.com/aws/aws-sdk-go-v2/service/route53
github.com/aws/aws-sdk-go-v2/service/route53/internal/customizations
@@ -284,7 +284,7 @@ github.com/aws/aws-sdk-go-v2/service/sso/types
github.com/aws/aws-sdk-go-v2/service/ssooidc
github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints
github.com/aws/aws-sdk-go-v2/service/ssooidc/types
-# github.com/aws/aws-sdk-go-v2/service/sts v1.33.18
+# github.com/aws/aws-sdk-go-v2/service/sts v1.33.19
## explicit; go 1.22
github.com/aws/aws-sdk-go-v2/service/sts
github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints
@@ -500,7 +500,7 @@ github.com/deckarep/golang-set/v2
## explicit; go 1.17
github.com/decred/dcrd/dcrec/secp256k1/v4
github.com/decred/dcrd/dcrec/secp256k1/v4/ecdsa
-# github.com/dgraph-io/badger/v4 v4.6.1-0.20250402023427-987f17dd1330
+# github.com/dgraph-io/badger/v4 v4.7.1-0.20250411021723-85389e88bf30
## explicit; go 1.23.0
github.com/dgraph-io/badger/v4
github.com/dgraph-io/badger/v4/fb
@@ -547,7 +547,7 @@ github.com/erikgeiser/coninput
# github.com/ethereum/c-kzg-4844 v1.0.3
## explicit; go 1.19
github.com/ethereum/c-kzg-4844/bindings/go
-# github.com/ethereum/go-ethereum v1.15.7
+# github.com/ethereum/go-ethereum v1.15.8
## explicit; go 1.23.0
github.com/ethereum/go-ethereum/log
# github.com/ethereum/go-verkle v0.2.2
@@ -572,7 +572,7 @@ github.com/garslo/gogen
# github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08
## explicit
github.com/gballet/go-libpcsclite
-# github.com/getsentry/sentry-go v0.31.1
+# github.com/getsentry/sentry-go v0.32.0
## explicit; go 1.21
github.com/getsentry/sentry-go
github.com/getsentry/sentry-go/internal/debug
@@ -893,7 +893,7 @@ github.com/pion/dtls/v3/pkg/protocol/alert
github.com/pion/dtls/v3/pkg/protocol/extension
github.com/pion/dtls/v3/pkg/protocol/handshake
github.com/pion/dtls/v3/pkg/protocol/recordlayer
-# github.com/pion/ice/v4 v4.0.9
+# github.com/pion/ice/v4 v4.0.10
## explicit; go 1.20
github.com/pion/ice/v4
github.com/pion/ice/v4/internal/atomic
@@ -927,7 +927,7 @@ github.com/pion/rtp
github.com/pion/rtp/codecs
github.com/pion/rtp/codecs/av1/obu
github.com/pion/rtp/codecs/vp9
-# github.com/pion/sctp v1.8.37
+# github.com/pion/sctp v1.8.38
## explicit; go 1.20
github.com/pion/sctp
# github.com/pion/sdp/v3 v3.0.11
@@ -983,12 +983,12 @@ github.com/pkg/errors
# github.com/pmezard/go-difflib v1.0.0
## explicit
github.com/pmezard/go-difflib/difflib
-# github.com/prometheus/client_golang v1.21.1
-## explicit; go 1.21
+# github.com/prometheus/client_golang v1.22.0
+## explicit; go 1.22
github.com/prometheus/client_golang/prometheus
github.com/prometheus/client_golang/prometheus/internal
-# github.com/prometheus/client_model v0.6.1
-## explicit; go 1.19
+# github.com/prometheus/client_model v0.6.2
+## explicit; go 1.22.0
github.com/prometheus/client_model/go
# github.com/prometheus/common v0.63.0
## explicit; go 1.21
@@ -1084,7 +1084,7 @@ github.com/ucwong/filecache
# github.com/ucwong/go-ttlmap v1.0.2-0.20221020173635-331e7ddde2bb
## explicit; go 1.19
github.com/ucwong/go-ttlmap
-# github.com/ucwong/golang-kv v1.0.24-0.20250403224746-16edf10ae080
+# github.com/ucwong/golang-kv v1.0.24-0.20250413092139-da21b79ba97d
## explicit; go 1.23.0
github.com/ucwong/golang-kv
github.com/ucwong/golang-kv/badger
@@ -1180,7 +1180,7 @@ golang.org/x/crypto/ripemd160
golang.org/x/crypto/scrypt
golang.org/x/crypto/sha3
golang.org/x/crypto/ssh/terminal
-# golang.org/x/exp v0.0.0-20250305212735-054e65f0b394
+# golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0
## explicit; go 1.23.0
golang.org/x/exp/constraints
golang.org/x/exp/rand
@@ -1199,7 +1199,7 @@ golang.org/x/mod/internal/lazyregexp
golang.org/x/mod/modfile
golang.org/x/mod/module
golang.org/x/mod/semver
-# golang.org/x/net v0.38.0
+# golang.org/x/net v0.39.0
## explicit; go 1.23.0
golang.org/x/net/bpf
golang.org/x/net/dns/dnsmessage
@@ -1252,7 +1252,7 @@ golang.org/x/text/width
# golang.org/x/time v0.11.0
## explicit; go 1.23.0
golang.org/x/time/rate
-# golang.org/x/tools v0.31.0
+# golang.org/x/tools v0.32.0
## explicit; go 1.23.0
golang.org/x/tools/cmd/stringer
golang.org/x/tools/go/ast/astutil