Update transitive dependencies

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alex@openfaas.com>
This commit is contained in:
Alex Ellis (OpenFaaS Ltd) 2024-06-17 11:54:29 +01:00
parent 3d2808354d
commit 3826262779
51 changed files with 299 additions and 129 deletions

View File

@ -21,18 +21,18 @@ require (
github.com/distribution/reference v0.6.0 // indirect github.com/distribution/reference v0.6.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.4 // indirect github.com/golang/protobuf v1.5.4 // indirect
github.com/klauspost/compress v1.17.8 // indirect github.com/klauspost/compress v1.17.9 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/nats-io/nats.go v1.35.0 // indirect github.com/nats-io/nats.go v1.36.0 // indirect
github.com/nats-io/nkeys v0.4.7 // indirect github.com/nats-io/nkeys v0.4.7 // indirect
github.com/nats-io/nuid v1.0.1 // indirect github.com/nats-io/nuid v1.0.1 // indirect
github.com/nats-io/stan.go v0.10.4 // indirect github.com/nats-io/stan.go v0.10.4 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.0 // indirect github.com/opencontainers/image-spec v1.1.0 // indirect
github.com/prometheus/common v0.53.0 // indirect github.com/prometheus/common v0.54.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect github.com/prometheus/procfs v0.15.1 // indirect
github.com/stretchr/testify v1.9.0 // indirect github.com/stretchr/testify v1.9.0 // indirect
golang.org/x/crypto v0.23.0 // indirect golang.org/x/crypto v0.24.0 // indirect
golang.org/x/sys v0.20.0 // indirect golang.org/x/sys v0.21.0 // indirect
google.golang.org/protobuf v1.34.1 // indirect google.golang.org/protobuf v1.34.2 // indirect
) )

View File

@ -164,6 +164,8 @@ github.com/klauspost/compress v1.17.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/
github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU=
github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA=
github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
@ -193,6 +195,8 @@ github.com/nats-io/nats.go v1.31.0 h1:/WFBHEc/dOKBF6qf1TZhrdEfTmOZ5JzdJ+Y3m6Y/p7
github.com/nats-io/nats.go v1.31.0/go.mod h1:di3Bm5MLsoB4Bx61CBTsxuarI36WbhAwOm8QrW39+i8= github.com/nats-io/nats.go v1.31.0/go.mod h1:di3Bm5MLsoB4Bx61CBTsxuarI36WbhAwOm8QrW39+i8=
github.com/nats-io/nats.go v1.35.0 h1:XFNqNM7v5B+MQMKqVGAyHwYhyKb48jrenXNxIU20ULk= github.com/nats-io/nats.go v1.35.0 h1:XFNqNM7v5B+MQMKqVGAyHwYhyKb48jrenXNxIU20ULk=
github.com/nats-io/nats.go v1.35.0/go.mod h1:Ubdu4Nh9exXdSz0RVWRFBbRfrbSxOYd26oF0wkWclB8= github.com/nats-io/nats.go v1.35.0/go.mod h1:Ubdu4Nh9exXdSz0RVWRFBbRfrbSxOYd26oF0wkWclB8=
github.com/nats-io/nats.go v1.36.0 h1:suEUPuWzTSse/XhESwqLxXGuj8vGRuPRoG7MoRN/qyU=
github.com/nats-io/nats.go v1.36.0/go.mod h1:Ubdu4Nh9exXdSz0RVWRFBbRfrbSxOYd26oF0wkWclB8=
github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4=
github.com/nats-io/nkeys v0.4.5 h1:Zdz2BUlFm4fJlierwvGK+yl20IAKUm7eV6AAZXEhkPk= github.com/nats-io/nkeys v0.4.5 h1:Zdz2BUlFm4fJlierwvGK+yl20IAKUm7eV6AAZXEhkPk=
github.com/nats-io/nkeys v0.4.5/go.mod h1:XUkxdLPTufzlihbamfzQ7mw/VGx6ObUs+0bN5sNvt64= github.com/nats-io/nkeys v0.4.5/go.mod h1:XUkxdLPTufzlihbamfzQ7mw/VGx6ObUs+0bN5sNvt64=
@ -256,6 +260,8 @@ github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdO
github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY=
github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE=
github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U=
github.com/prometheus/common v0.54.0 h1:ZlZy0BgJhTwVZUn7dLOkwCZHUkrAqd3WYtcFCWnM1D8=
github.com/prometheus/common v0.54.0/go.mod h1:/TQgMJP5CuVYveyT7n/0Ix8yLNNXy9yRSkhnLTHPDIQ=
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
@ -310,6 +316,8 @@ golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc=
golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI=
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI=
golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@ -440,6 +448,8 @@ golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws=
golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ=
@ -581,6 +591,8 @@ google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg=
google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=

View File

@ -5,7 +5,6 @@
#include "textflag.h" #include "textflag.h"
// func matchLen(a []byte, b []byte) int // func matchLen(a []byte, b []byte) int
// Requires: BMI
TEXT ·matchLen(SB), NOSPLIT, $0-56 TEXT ·matchLen(SB), NOSPLIT, $0-56
MOVQ a_base+0(FP), AX MOVQ a_base+0(FP), AX
MOVQ b_base+24(FP), CX MOVQ b_base+24(FP), CX
@ -17,17 +16,16 @@ TEXT ·matchLen(SB), NOSPLIT, $0-56
JB matchlen_match4_standalone JB matchlen_match4_standalone
matchlen_loopback_standalone: matchlen_loopback_standalone:
MOVQ (AX)(SI*1), BX MOVQ (AX)(SI*1), BX
XORQ (CX)(SI*1), BX XORQ (CX)(SI*1), BX
TESTQ BX, BX JZ matchlen_loop_standalone
JZ matchlen_loop_standalone
#ifdef GOAMD64_v3 #ifdef GOAMD64_v3
TZCNTQ BX, BX TZCNTQ BX, BX
#else #else
BSFQ BX, BX BSFQ BX, BX
#endif #endif
SARQ $0x03, BX SHRL $0x03, BX
LEAL (SI)(BX*1), SI LEAL (SI)(BX*1), SI
JMP gen_match_len_end JMP gen_match_len_end

View File

@ -31,7 +31,7 @@ When using or transitioning to Go modules support:
```bash ```bash
# Go client latest or explicit version # Go client latest or explicit version
go get github.com/nats-io/nats.go/@latest go get github.com/nats-io/nats.go/@latest
go get github.com/nats-io/nats.go/@v1.35.0 go get github.com/nats-io/nats.go/@v1.36.0
# For latest NATS Server, add /v2 at the end # For latest NATS Server, add /v2 at the end
go get github.com/nats-io/nats-server/v2 go get github.com/nats-io/nats-server/v2

View File

@ -4,20 +4,20 @@ go 1.19
require ( require (
github.com/golang/protobuf v1.4.2 github.com/golang/protobuf v1.4.2
github.com/klauspost/compress v1.17.6 github.com/klauspost/compress v1.17.8
github.com/nats-io/jwt v1.2.2 github.com/nats-io/jwt v1.2.2
github.com/nats-io/nats-server/v2 v2.10.11 github.com/nats-io/nats-server/v2 v2.10.16
github.com/nats-io/nkeys v0.4.7 github.com/nats-io/nkeys v0.4.7
github.com/nats-io/nuid v1.0.1 github.com/nats-io/nuid v1.0.1
go.uber.org/goleak v1.3.0 go.uber.org/goleak v1.3.0
golang.org/x/text v0.14.0 golang.org/x/text v0.15.0
google.golang.org/protobuf v1.23.0 google.golang.org/protobuf v1.23.0
) )
require ( require (
github.com/minio/highwayhash v1.0.2 // indirect github.com/minio/highwayhash v1.0.2 // indirect
github.com/nats-io/jwt/v2 v2.5.3 // indirect github.com/nats-io/jwt/v2 v2.5.7 // indirect
golang.org/x/crypto v0.19.0 // indirect golang.org/x/crypto v0.23.0 // indirect
golang.org/x/sys v0.17.0 // indirect golang.org/x/sys v0.20.0 // indirect
golang.org/x/time v0.5.0 // indirect golang.org/x/time v0.5.0 // indirect
) )

View File

@ -10,16 +10,16 @@ github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4=
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/klauspost/compress v1.17.6 h1:60eq2E/jlfwQXtvZEeBUYADs+BwKBWURIY+Gj2eRGjI= github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU=
github.com/klauspost/compress v1.17.6/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g=
github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY=
github.com/nats-io/jwt v1.2.2 h1:w3GMTO969dFg+UOKTmmyuu7IGdusK+7Ytlt//OYH/uU= github.com/nats-io/jwt v1.2.2 h1:w3GMTO969dFg+UOKTmmyuu7IGdusK+7Ytlt//OYH/uU=
github.com/nats-io/jwt v1.2.2/go.mod h1:/xX356yQA6LuXI9xWW7mZNpxgF2mBmGecH+Fj34sP5Q= github.com/nats-io/jwt v1.2.2/go.mod h1:/xX356yQA6LuXI9xWW7mZNpxgF2mBmGecH+Fj34sP5Q=
github.com/nats-io/jwt/v2 v2.5.3 h1:/9SWvzc6hTfamcgXJ3uYRpgj+QuY2aLNqRiqrKcrpEo= github.com/nats-io/jwt/v2 v2.5.7 h1:j5lH1fUXCnJnY8SsQeB/a/z9Azgu2bYIDvtPVNdxe2c=
github.com/nats-io/jwt/v2 v2.5.3/go.mod h1:iysuPemFcc7p4IoYots3IuELSI4EDe9Y0bQMe+I3Bf4= github.com/nats-io/jwt/v2 v2.5.7/go.mod h1:ZdWS1nZa6WMZfFwwgpEaqBV8EPGVgOTDHN/wTbz0Y5A=
github.com/nats-io/nats-server/v2 v2.10.11 h1:yKUiLVincZISpo3A4YljJQ+HfLltGAgoNNJl99KL8I0= github.com/nats-io/nats-server/v2 v2.10.16 h1:2jXaiydp5oB/nAx/Ytf9fdCi9QN6ItIc9eehX8kwVV0=
github.com/nats-io/nats-server/v2 v2.10.11/go.mod h1:dXtOqVWzbMTEj+tUyC/itXjJhW37xh0tUBrTAlqAfx8= github.com/nats-io/nats-server/v2 v2.10.16/go.mod h1:Pksi38H2+6xLe1vQx0/EA4bzetM0NqyIHcIbmgXSkIU=
github.com/nats-io/nkeys v0.2.0/go.mod h1:XdZpAbhgyyODYqjTawOnIOI7VlbKSarI9Gfy1tqEu/s= github.com/nats-io/nkeys v0.2.0/go.mod h1:XdZpAbhgyyODYqjTawOnIOI7VlbKSarI9Gfy1tqEu/s=
github.com/nats-io/nkeys v0.4.7 h1:RwNJbbIdYCoClSDNY7QVKZlyb/wfT6ugvFCiKy6vDvI= github.com/nats-io/nkeys v0.4.7 h1:RwNJbbIdYCoClSDNY7QVKZlyb/wfT6ugvFCiKy6vDvI=
github.com/nats-io/nkeys v0.4.7/go.mod h1:kqXRgRDPlGy7nGaEDMuYzmiJCIAAWDK0IMBtDmGD0nc= github.com/nats-io/nkeys v0.4.7/go.mod h1:kqXRgRDPlGy7nGaEDMuYzmiJCIAAWDK0IMBtDmGD0nc=
@ -31,17 +31,17 @@ go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo= golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI=
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk=
golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=

View File

@ -47,7 +47,7 @@ import (
// Default Constants // Default Constants
const ( const (
Version = "1.35.0" Version = "1.36.0"
DefaultURL = "nats://127.0.0.1:4222" DefaultURL = "nats://127.0.0.1:4222"
DefaultPort = 4222 DefaultPort = 4222
DefaultMaxReconnect = 60 DefaultMaxReconnect = 60
@ -5483,7 +5483,7 @@ func (nc *Conn) drainConnection() {
// Drain will put a connection into a drain state. All subscriptions will // Drain will put a connection into a drain state. All subscriptions will
// immediately be put into a drain state. Upon completion, the publishers // immediately be put into a drain state. Upon completion, the publishers
// will be drained and can not publish any additional messages. Upon draining // will be drained and can not publish any additional messages. Upon draining
// of the publishers, the connection will be closed. Use the ClosedCB() // of the publishers, the connection will be closed. Use the ClosedCB
// option to know when the connection has moved from draining to closed. // option to know when the connection has moved from draining to closed.
// //
// See note in Subscription.Drain for JetStream subscriptions. // See note in Subscription.Drain for JetStream subscriptions.

View File

@ -263,6 +263,7 @@ struct ltchars {
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/seccomp.h> #include <linux/seccomp.h>
#include <linux/serial.h> #include <linux/serial.h>
#include <linux/sock_diag.h>
#include <linux/sockios.h> #include <linux/sockios.h>
#include <linux/taskstats.h> #include <linux/taskstats.h>
#include <linux/tipc.h> #include <linux/tipc.h>
@ -549,6 +550,7 @@ ccflags="$@"
$2 !~ "NLA_TYPE_MASK" && $2 !~ "NLA_TYPE_MASK" &&
$2 !~ /^RTC_VL_(ACCURACY|BACKUP|DATA)/ && $2 !~ /^RTC_VL_(ACCURACY|BACKUP|DATA)/ &&
$2 ~ /^(NETLINK|NLM|NLMSG|NLA|IFA|IFAN|RT|RTC|RTCF|RTN|RTPROT|RTNH|ARPHRD|ETH_P|NETNSA)_/ || $2 ~ /^(NETLINK|NLM|NLMSG|NLA|IFA|IFAN|RT|RTC|RTCF|RTN|RTPROT|RTNH|ARPHRD|ETH_P|NETNSA)_/ ||
$2 ~ /^SOCK_|SK_DIAG_|SKNLGRP_$/ ||
$2 ~ /^FIORDCHK$/ || $2 ~ /^FIORDCHK$/ ||
$2 ~ /^SIOC/ || $2 ~ /^SIOC/ ||
$2 ~ /^TIOC/ || $2 ~ /^TIOC/ ||

View File

@ -502,6 +502,7 @@ const (
BPF_IMM = 0x0 BPF_IMM = 0x0
BPF_IND = 0x40 BPF_IND = 0x40
BPF_JA = 0x0 BPF_JA = 0x0
BPF_JCOND = 0xe0
BPF_JEQ = 0x10 BPF_JEQ = 0x10
BPF_JGE = 0x30 BPF_JGE = 0x30
BPF_JGT = 0x20 BPF_JGT = 0x20
@ -657,6 +658,9 @@ const (
CAN_NPROTO = 0x8 CAN_NPROTO = 0x8
CAN_RAW = 0x1 CAN_RAW = 0x1
CAN_RAW_FILTER_MAX = 0x200 CAN_RAW_FILTER_MAX = 0x200
CAN_RAW_XL_VCID_RX_FILTER = 0x4
CAN_RAW_XL_VCID_TX_PASS = 0x2
CAN_RAW_XL_VCID_TX_SET = 0x1
CAN_RTR_FLAG = 0x40000000 CAN_RTR_FLAG = 0x40000000
CAN_SFF_ID_BITS = 0xb CAN_SFF_ID_BITS = 0xb
CAN_SFF_MASK = 0x7ff CAN_SFF_MASK = 0x7ff
@ -1339,6 +1343,7 @@ const (
F_OFD_SETLK = 0x25 F_OFD_SETLK = 0x25
F_OFD_SETLKW = 0x26 F_OFD_SETLKW = 0x26
F_OK = 0x0 F_OK = 0x0
F_SEAL_EXEC = 0x20
F_SEAL_FUTURE_WRITE = 0x10 F_SEAL_FUTURE_WRITE = 0x10
F_SEAL_GROW = 0x4 F_SEAL_GROW = 0x4
F_SEAL_SEAL = 0x1 F_SEAL_SEAL = 0x1
@ -1627,6 +1632,7 @@ const (
IP_FREEBIND = 0xf IP_FREEBIND = 0xf
IP_HDRINCL = 0x3 IP_HDRINCL = 0x3
IP_IPSEC_POLICY = 0x10 IP_IPSEC_POLICY = 0x10
IP_LOCAL_PORT_RANGE = 0x33
IP_MAXPACKET = 0xffff IP_MAXPACKET = 0xffff
IP_MAX_MEMBERSHIPS = 0x14 IP_MAX_MEMBERSHIPS = 0x14
IP_MF = 0x2000 IP_MF = 0x2000
@ -1653,6 +1659,7 @@ const (
IP_PMTUDISC_OMIT = 0x5 IP_PMTUDISC_OMIT = 0x5
IP_PMTUDISC_PROBE = 0x3 IP_PMTUDISC_PROBE = 0x3
IP_PMTUDISC_WANT = 0x1 IP_PMTUDISC_WANT = 0x1
IP_PROTOCOL = 0x34
IP_RECVERR = 0xb IP_RECVERR = 0xb
IP_RECVERR_RFC4884 = 0x1a IP_RECVERR_RFC4884 = 0x1a
IP_RECVFRAGSIZE = 0x19 IP_RECVFRAGSIZE = 0x19
@ -2169,7 +2176,7 @@ const (
NFT_SECMARK_CTX_MAXLEN = 0x100 NFT_SECMARK_CTX_MAXLEN = 0x100
NFT_SET_MAXNAMELEN = 0x100 NFT_SET_MAXNAMELEN = 0x100
NFT_SOCKET_MAX = 0x3 NFT_SOCKET_MAX = 0x3
NFT_TABLE_F_MASK = 0x3 NFT_TABLE_F_MASK = 0x7
NFT_TABLE_MAXNAMELEN = 0x100 NFT_TABLE_MAXNAMELEN = 0x100
NFT_TRACETYPE_MAX = 0x3 NFT_TRACETYPE_MAX = 0x3
NFT_TUNNEL_F_MASK = 0x7 NFT_TUNNEL_F_MASK = 0x7
@ -2403,6 +2410,7 @@ const (
PERF_RECORD_MISC_USER = 0x2 PERF_RECORD_MISC_USER = 0x2
PERF_SAMPLE_BRANCH_PLM_ALL = 0x7 PERF_SAMPLE_BRANCH_PLM_ALL = 0x7
PERF_SAMPLE_WEIGHT_TYPE = 0x1004000 PERF_SAMPLE_WEIGHT_TYPE = 0x1004000
PID_FS_MAGIC = 0x50494446
PIPEFS_MAGIC = 0x50495045 PIPEFS_MAGIC = 0x50495045
PPPIOCGNPMODE = 0xc008744c PPPIOCGNPMODE = 0xc008744c
PPPIOCNEWUNIT = 0xc004743e PPPIOCNEWUNIT = 0xc004743e
@ -2896,8 +2904,9 @@ const (
RWF_APPEND = 0x10 RWF_APPEND = 0x10
RWF_DSYNC = 0x2 RWF_DSYNC = 0x2
RWF_HIPRI = 0x1 RWF_HIPRI = 0x1
RWF_NOAPPEND = 0x20
RWF_NOWAIT = 0x8 RWF_NOWAIT = 0x8
RWF_SUPPORTED = 0x1f RWF_SUPPORTED = 0x3f
RWF_SYNC = 0x4 RWF_SYNC = 0x4
RWF_WRITE_LIFE_NOT_SET = 0x0 RWF_WRITE_LIFE_NOT_SET = 0x0
SCHED_BATCH = 0x3 SCHED_BATCH = 0x3
@ -2918,7 +2927,9 @@ const (
SCHED_RESET_ON_FORK = 0x40000000 SCHED_RESET_ON_FORK = 0x40000000
SCHED_RR = 0x2 SCHED_RR = 0x2
SCM_CREDENTIALS = 0x2 SCM_CREDENTIALS = 0x2
SCM_PIDFD = 0x4
SCM_RIGHTS = 0x1 SCM_RIGHTS = 0x1
SCM_SECURITY = 0x3
SCM_TIMESTAMP = 0x1d SCM_TIMESTAMP = 0x1d
SC_LOG_FLUSH = 0x100000 SC_LOG_FLUSH = 0x100000
SECCOMP_ADDFD_FLAG_SEND = 0x2 SECCOMP_ADDFD_FLAG_SEND = 0x2
@ -3051,6 +3062,8 @@ const (
SIOCSMIIREG = 0x8949 SIOCSMIIREG = 0x8949
SIOCSRARP = 0x8962 SIOCSRARP = 0x8962
SIOCWANDEV = 0x894a SIOCWANDEV = 0x894a
SK_DIAG_BPF_STORAGE_MAX = 0x3
SK_DIAG_BPF_STORAGE_REQ_MAX = 0x1
SMACK_MAGIC = 0x43415d53 SMACK_MAGIC = 0x43415d53
SMART_AUTOSAVE = 0xd2 SMART_AUTOSAVE = 0xd2
SMART_AUTO_OFFLINE = 0xdb SMART_AUTO_OFFLINE = 0xdb
@ -3071,6 +3084,8 @@ const (
SOCKFS_MAGIC = 0x534f434b SOCKFS_MAGIC = 0x534f434b
SOCK_BUF_LOCK_MASK = 0x3 SOCK_BUF_LOCK_MASK = 0x3
SOCK_DCCP = 0x6 SOCK_DCCP = 0x6
SOCK_DESTROY = 0x15
SOCK_DIAG_BY_FAMILY = 0x14
SOCK_IOC_TYPE = 0x89 SOCK_IOC_TYPE = 0x89
SOCK_PACKET = 0xa SOCK_PACKET = 0xa
SOCK_RAW = 0x3 SOCK_RAW = 0x3
@ -3260,6 +3275,7 @@ const (
TCP_MAX_WINSHIFT = 0xe TCP_MAX_WINSHIFT = 0xe
TCP_MD5SIG = 0xe TCP_MD5SIG = 0xe
TCP_MD5SIG_EXT = 0x20 TCP_MD5SIG_EXT = 0x20
TCP_MD5SIG_FLAG_IFINDEX = 0x2
TCP_MD5SIG_FLAG_PREFIX = 0x1 TCP_MD5SIG_FLAG_PREFIX = 0x1
TCP_MD5SIG_MAXKEYLEN = 0x50 TCP_MD5SIG_MAXKEYLEN = 0x50
TCP_MSS = 0x200 TCP_MSS = 0x200

View File

@ -118,6 +118,7 @@ const (
IXOFF = 0x1000 IXOFF = 0x1000
IXON = 0x400 IXON = 0x400
MAP_32BIT = 0x40 MAP_32BIT = 0x40
MAP_ABOVE4G = 0x80
MAP_ANON = 0x20 MAP_ANON = 0x20
MAP_ANONYMOUS = 0x20 MAP_ANONYMOUS = 0x20
MAP_DENYWRITE = 0x800 MAP_DENYWRITE = 0x800

View File

@ -118,6 +118,7 @@ const (
IXOFF = 0x1000 IXOFF = 0x1000
IXON = 0x400 IXON = 0x400
MAP_32BIT = 0x40 MAP_32BIT = 0x40
MAP_ABOVE4G = 0x80
MAP_ANON = 0x20 MAP_ANON = 0x20
MAP_ANONYMOUS = 0x20 MAP_ANONYMOUS = 0x20
MAP_DENYWRITE = 0x800 MAP_DENYWRITE = 0x800

View File

@ -87,6 +87,7 @@ const (
FICLONE = 0x40049409 FICLONE = 0x40049409
FICLONERANGE = 0x4020940d FICLONERANGE = 0x4020940d
FLUSHO = 0x1000 FLUSHO = 0x1000
FPMR_MAGIC = 0x46504d52
FPSIMD_MAGIC = 0x46508001 FPSIMD_MAGIC = 0x46508001
FS_IOC_ENABLE_VERITY = 0x40806685 FS_IOC_ENABLE_VERITY = 0x40806685
FS_IOC_GETFLAGS = 0x80086601 FS_IOC_GETFLAGS = 0x80086601

View File

@ -4605,7 +4605,7 @@ const (
NL80211_ATTR_MAC_HINT = 0xc8 NL80211_ATTR_MAC_HINT = 0xc8
NL80211_ATTR_MAC_MASK = 0xd7 NL80211_ATTR_MAC_MASK = 0xd7
NL80211_ATTR_MAX_AP_ASSOC_STA = 0xca NL80211_ATTR_MAX_AP_ASSOC_STA = 0xca
NL80211_ATTR_MAX = 0x149 NL80211_ATTR_MAX = 0x14a
NL80211_ATTR_MAX_CRIT_PROT_DURATION = 0xb4 NL80211_ATTR_MAX_CRIT_PROT_DURATION = 0xb4
NL80211_ATTR_MAX_CSA_COUNTERS = 0xce NL80211_ATTR_MAX_CSA_COUNTERS = 0xce
NL80211_ATTR_MAX_MATCH_SETS = 0x85 NL80211_ATTR_MAX_MATCH_SETS = 0x85
@ -5209,7 +5209,7 @@ const (
NL80211_FREQUENCY_ATTR_GO_CONCURRENT = 0xf NL80211_FREQUENCY_ATTR_GO_CONCURRENT = 0xf
NL80211_FREQUENCY_ATTR_INDOOR_ONLY = 0xe NL80211_FREQUENCY_ATTR_INDOOR_ONLY = 0xe
NL80211_FREQUENCY_ATTR_IR_CONCURRENT = 0xf NL80211_FREQUENCY_ATTR_IR_CONCURRENT = 0xf
NL80211_FREQUENCY_ATTR_MAX = 0x1f NL80211_FREQUENCY_ATTR_MAX = 0x20
NL80211_FREQUENCY_ATTR_MAX_TX_POWER = 0x6 NL80211_FREQUENCY_ATTR_MAX_TX_POWER = 0x6
NL80211_FREQUENCY_ATTR_NO_10MHZ = 0x11 NL80211_FREQUENCY_ATTR_NO_10MHZ = 0x11
NL80211_FREQUENCY_ATTR_NO_160MHZ = 0xc NL80211_FREQUENCY_ATTR_NO_160MHZ = 0xc
@ -5703,7 +5703,7 @@ const (
NL80211_STA_FLAG_ASSOCIATED = 0x7 NL80211_STA_FLAG_ASSOCIATED = 0x7
NL80211_STA_FLAG_AUTHENTICATED = 0x5 NL80211_STA_FLAG_AUTHENTICATED = 0x5
NL80211_STA_FLAG_AUTHORIZED = 0x1 NL80211_STA_FLAG_AUTHORIZED = 0x1
NL80211_STA_FLAG_MAX = 0x7 NL80211_STA_FLAG_MAX = 0x8
NL80211_STA_FLAG_MAX_OLD_API = 0x6 NL80211_STA_FLAG_MAX_OLD_API = 0x6
NL80211_STA_FLAG_MFP = 0x4 NL80211_STA_FLAG_MFP = 0x4
NL80211_STA_FLAG_SHORT_PREAMBLE = 0x2 NL80211_STA_FLAG_SHORT_PREAMBLE = 0x2
@ -6001,3 +6001,34 @@ type CachestatRange struct {
Off uint64 Off uint64
Len uint64 Len uint64
} }
const (
SK_MEMINFO_RMEM_ALLOC = 0x0
SK_MEMINFO_RCVBUF = 0x1
SK_MEMINFO_WMEM_ALLOC = 0x2
SK_MEMINFO_SNDBUF = 0x3
SK_MEMINFO_FWD_ALLOC = 0x4
SK_MEMINFO_WMEM_QUEUED = 0x5
SK_MEMINFO_OPTMEM = 0x6
SK_MEMINFO_BACKLOG = 0x7
SK_MEMINFO_DROPS = 0x8
SK_MEMINFO_VARS = 0x9
SKNLGRP_NONE = 0x0
SKNLGRP_INET_TCP_DESTROY = 0x1
SKNLGRP_INET_UDP_DESTROY = 0x2
SKNLGRP_INET6_TCP_DESTROY = 0x3
SKNLGRP_INET6_UDP_DESTROY = 0x4
SK_DIAG_BPF_STORAGE_REQ_NONE = 0x0
SK_DIAG_BPF_STORAGE_REQ_MAP_FD = 0x1
SK_DIAG_BPF_STORAGE_REP_NONE = 0x0
SK_DIAG_BPF_STORAGE = 0x1
SK_DIAG_BPF_STORAGE_NONE = 0x0
SK_DIAG_BPF_STORAGE_PAD = 0x1
SK_DIAG_BPF_STORAGE_MAP_ID = 0x2
SK_DIAG_BPF_STORAGE_MAP_VALUE = 0x3
)
type SockDiagReq struct {
Family uint8
Protocol uint8
}

View File

@ -68,6 +68,7 @@ type UserInfo10 struct {
//sys NetUserGetInfo(serverName *uint16, userName *uint16, level uint32, buf **byte) (neterr error) = netapi32.NetUserGetInfo //sys NetUserGetInfo(serverName *uint16, userName *uint16, level uint32, buf **byte) (neterr error) = netapi32.NetUserGetInfo
//sys NetGetJoinInformation(server *uint16, name **uint16, bufType *uint32) (neterr error) = netapi32.NetGetJoinInformation //sys NetGetJoinInformation(server *uint16, name **uint16, bufType *uint32) (neterr error) = netapi32.NetGetJoinInformation
//sys NetApiBufferFree(buf *byte) (neterr error) = netapi32.NetApiBufferFree //sys NetApiBufferFree(buf *byte) (neterr error) = netapi32.NetApiBufferFree
//sys NetUserEnum(serverName *uint16, level uint32, filter uint32, buf **byte, prefMaxLen uint32, entriesRead *uint32, totalEntries *uint32, resumeHandle *uint32) (neterr error) = netapi32.NetUserEnum
const ( const (
// do not reorder // do not reorder

View File

@ -401,6 +401,7 @@ var (
procTransmitFile = modmswsock.NewProc("TransmitFile") procTransmitFile = modmswsock.NewProc("TransmitFile")
procNetApiBufferFree = modnetapi32.NewProc("NetApiBufferFree") procNetApiBufferFree = modnetapi32.NewProc("NetApiBufferFree")
procNetGetJoinInformation = modnetapi32.NewProc("NetGetJoinInformation") procNetGetJoinInformation = modnetapi32.NewProc("NetGetJoinInformation")
procNetUserEnum = modnetapi32.NewProc("NetUserEnum")
procNetUserGetInfo = modnetapi32.NewProc("NetUserGetInfo") procNetUserGetInfo = modnetapi32.NewProc("NetUserGetInfo")
procNtCreateFile = modntdll.NewProc("NtCreateFile") procNtCreateFile = modntdll.NewProc("NtCreateFile")
procNtCreateNamedPipeFile = modntdll.NewProc("NtCreateNamedPipeFile") procNtCreateNamedPipeFile = modntdll.NewProc("NtCreateNamedPipeFile")
@ -3486,6 +3487,14 @@ func NetGetJoinInformation(server *uint16, name **uint16, bufType *uint32) (nete
return return
} }
func NetUserEnum(serverName *uint16, level uint32, filter uint32, buf **byte, prefMaxLen uint32, entriesRead *uint32, totalEntries *uint32, resumeHandle *uint32) (neterr error) {
r0, _, _ := syscall.Syscall9(procNetUserEnum.Addr(), 8, uintptr(unsafe.Pointer(serverName)), uintptr(level), uintptr(filter), uintptr(unsafe.Pointer(buf)), uintptr(prefMaxLen), uintptr(unsafe.Pointer(entriesRead)), uintptr(unsafe.Pointer(totalEntries)), uintptr(unsafe.Pointer(resumeHandle)), 0)
if r0 != 0 {
neterr = syscall.Errno(r0)
}
return
}
func NetUserGetInfo(serverName *uint16, userName *uint16, level uint32, buf **byte) (neterr error) { func NetUserGetInfo(serverName *uint16, userName *uint16, level uint32, buf **byte) (neterr error) {
r0, _, _ := syscall.Syscall6(procNetUserGetInfo.Addr(), 4, uintptr(unsafe.Pointer(serverName)), uintptr(unsafe.Pointer(userName)), uintptr(level), uintptr(unsafe.Pointer(buf)), 0, 0) r0, _, _ := syscall.Syscall6(procNetUserGetInfo.Addr(), 4, uintptr(unsafe.Pointer(serverName)), uintptr(unsafe.Pointer(userName)), uintptr(level), uintptr(unsafe.Pointer(buf)), 0, 0)
if r0 != 0 { if r0 != 0 {

View File

@ -84,7 +84,7 @@ type decoder struct {
} }
// newError returns an error object with position info. // newError returns an error object with position info.
func (d decoder) newError(pos int, f string, x ...interface{}) error { func (d decoder) newError(pos int, f string, x ...any) error {
line, column := d.Position(pos) line, column := d.Position(pos)
head := fmt.Sprintf("(line %d:%d): ", line, column) head := fmt.Sprintf("(line %d:%d): ", line, column)
return errors.New(head+f, x...) return errors.New(head+f, x...)
@ -96,7 +96,7 @@ func (d decoder) unexpectedTokenError(tok text.Token) error {
} }
// syntaxError returns a syntax error for given position. // syntaxError returns a syntax error for given position.
func (d decoder) syntaxError(pos int, f string, x ...interface{}) error { func (d decoder) syntaxError(pos int, f string, x ...any) error {
line, column := d.Position(pos) line, column := d.Position(pos)
head := fmt.Sprintf("syntax error (line %d:%d): ", line, column) head := fmt.Sprintf("syntax error (line %d:%d): ", line, column)
return errors.New(head+f, x...) return errors.New(head+f, x...)

View File

@ -601,7 +601,7 @@ func (d *Decoder) consumeToken(kind Kind, size int, attrs uint8) Token {
// newSyntaxError returns a syntax error with line and column information for // newSyntaxError returns a syntax error with line and column information for
// current position. // current position.
func (d *Decoder) newSyntaxError(f string, x ...interface{}) error { func (d *Decoder) newSyntaxError(f string, x ...any) error {
e := errors.New(f, x...) e := errors.New(f, x...)
line, column := d.Position(len(d.orig) - len(d.in)) line, column := d.Position(len(d.orig) - len(d.in))
return errors.New("syntax error (line %d:%d): %v", line, column, e) return errors.New("syntax error (line %d:%d): %v", line, column, e)

View File

@ -17,7 +17,7 @@ var Error = errors.New("protobuf error")
// New formats a string according to the format specifier and arguments and // New formats a string according to the format specifier and arguments and
// returns an error that has a "proto" prefix. // returns an error that has a "proto" prefix.
func New(f string, x ...interface{}) error { func New(f string, x ...any) error {
return &prefixError{s: format(f, x...)} return &prefixError{s: format(f, x...)}
} }
@ -43,7 +43,7 @@ func (e *prefixError) Unwrap() error {
// Wrap returns an error that has a "proto" prefix, the formatted string described // Wrap returns an error that has a "proto" prefix, the formatted string described
// by the format specifier and arguments, and a suffix of err. The error wraps err. // by the format specifier and arguments, and a suffix of err. The error wraps err.
func Wrap(err error, f string, x ...interface{}) error { func Wrap(err error, f string, x ...any) error {
return &wrapError{ return &wrapError{
s: format(f, x...), s: format(f, x...),
err: err, err: err,
@ -67,7 +67,7 @@ func (e *wrapError) Is(target error) bool {
return target == Error return target == Error
} }
func format(f string, x ...interface{}) string { func format(f string, x ...any) string {
// avoid "proto: " prefix when chaining // avoid "proto: " prefix when chaining
for i := 0; i < len(x); i++ { for i := 0; i < len(x); i++ {
switch e := x[i].(type) { switch e := x[i].(type) {

View File

@ -383,6 +383,10 @@ func (fd *Field) Message() protoreflect.MessageDescriptor {
} }
return fd.L1.Message return fd.L1.Message
} }
func (fd *Field) IsMapEntry() bool {
parent, ok := fd.L0.Parent.(protoreflect.MessageDescriptor)
return ok && parent.IsMapEntry()
}
func (fd *Field) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, fd) } func (fd *Field) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, fd) }
func (fd *Field) ProtoType(protoreflect.FieldDescriptor) {} func (fd *Field) ProtoType(protoreflect.FieldDescriptor) {}

View File

@ -534,7 +534,7 @@ func (sd *Service) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd protor
} }
var nameBuilderPool = sync.Pool{ var nameBuilderPool = sync.Pool{
New: func() interface{} { return new(strs.Builder) }, New: func() any { return new(strs.Builder) },
} }
func getBuilder() *strs.Builder { func getBuilder() *strs.Builder {

View File

@ -45,6 +45,11 @@ func (file *File) resolveMessages() {
case protoreflect.MessageKind, protoreflect.GroupKind: case protoreflect.MessageKind, protoreflect.GroupKind:
fd.L1.Message = file.resolveMessageDependency(fd.L1.Message, listFieldDeps, depIdx) fd.L1.Message = file.resolveMessageDependency(fd.L1.Message, listFieldDeps, depIdx)
depIdx++ depIdx++
if fd.L1.Kind == protoreflect.GroupKind && (fd.IsMap() || fd.IsMapEntry()) {
// A map field might inherit delimited encoding from a file-wide default feature.
// But maps never actually use delimited encoding. (At least for now...)
fd.L1.Kind = protoreflect.MessageKind
}
} }
// Default is resolved here since it depends on Enum being resolved. // Default is resolved here since it depends on Enum being resolved.

View File

@ -68,7 +68,7 @@ type Builder struct {
// and for input and output messages referenced by service methods. // and for input and output messages referenced by service methods.
// Dependencies must come after declarations, but the ordering of // Dependencies must come after declarations, but the ordering of
// dependencies themselves is unspecified. // dependencies themselves is unspecified.
GoTypes []interface{} GoTypes []any
// DependencyIndexes is an ordered list of indexes into GoTypes for the // DependencyIndexes is an ordered list of indexes into GoTypes for the
// dependencies of messages, extensions, or services. // dependencies of messages, extensions, or services.
@ -268,7 +268,7 @@ func (x depIdxs) Get(i, j int32) int32 {
type ( type (
resolverByIndex struct { resolverByIndex struct {
goTypes []interface{} goTypes []any
depIdxs depIdxs depIdxs depIdxs
fileRegistry fileRegistry
} }

View File

@ -860,11 +860,13 @@ const (
EnumValueOptions_Deprecated_field_name protoreflect.Name = "deprecated" EnumValueOptions_Deprecated_field_name protoreflect.Name = "deprecated"
EnumValueOptions_Features_field_name protoreflect.Name = "features" EnumValueOptions_Features_field_name protoreflect.Name = "features"
EnumValueOptions_DebugRedact_field_name protoreflect.Name = "debug_redact" EnumValueOptions_DebugRedact_field_name protoreflect.Name = "debug_redact"
EnumValueOptions_FeatureSupport_field_name protoreflect.Name = "feature_support"
EnumValueOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option" EnumValueOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option"
EnumValueOptions_Deprecated_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.deprecated" EnumValueOptions_Deprecated_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.deprecated"
EnumValueOptions_Features_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.features" EnumValueOptions_Features_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.features"
EnumValueOptions_DebugRedact_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.debug_redact" EnumValueOptions_DebugRedact_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.debug_redact"
EnumValueOptions_FeatureSupport_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.feature_support"
EnumValueOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.uninterpreted_option" EnumValueOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.uninterpreted_option"
) )
@ -873,6 +875,7 @@ const (
EnumValueOptions_Deprecated_field_number protoreflect.FieldNumber = 1 EnumValueOptions_Deprecated_field_number protoreflect.FieldNumber = 1
EnumValueOptions_Features_field_number protoreflect.FieldNumber = 2 EnumValueOptions_Features_field_number protoreflect.FieldNumber = 2
EnumValueOptions_DebugRedact_field_number protoreflect.FieldNumber = 3 EnumValueOptions_DebugRedact_field_number protoreflect.FieldNumber = 3
EnumValueOptions_FeatureSupport_field_number protoreflect.FieldNumber = 4
EnumValueOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999 EnumValueOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999
) )

View File

@ -22,13 +22,13 @@ type Export struct{}
// NewError formats a string according to the format specifier and arguments and // NewError formats a string according to the format specifier and arguments and
// returns an error that has a "proto" prefix. // returns an error that has a "proto" prefix.
func (Export) NewError(f string, x ...interface{}) error { func (Export) NewError(f string, x ...any) error {
return errors.New(f, x...) return errors.New(f, x...)
} }
// enum is any enum type generated by protoc-gen-go // enum is any enum type generated by protoc-gen-go
// and must be a named int32 type. // and must be a named int32 type.
type enum = interface{} type enum = any
// EnumOf returns the protoreflect.Enum interface over e. // EnumOf returns the protoreflect.Enum interface over e.
// It returns nil if e is nil. // It returns nil if e is nil.
@ -81,7 +81,7 @@ func (Export) EnumStringOf(ed protoreflect.EnumDescriptor, n protoreflect.EnumNu
// message is any message type generated by protoc-gen-go // message is any message type generated by protoc-gen-go
// and must be a pointer to a named struct type. // and must be a pointer to a named struct type.
type message = interface{} type message = any
// legacyMessageWrapper wraps a v2 message as a v1 message. // legacyMessageWrapper wraps a v2 message as a v1 message.
type legacyMessageWrapper struct{ m protoreflect.ProtoMessage } type legacyMessageWrapper struct{ m protoreflect.ProtoMessage }

View File

@ -68,7 +68,7 @@ func (mi *MessageInfo) isInitExtensions(ext *map[int32]ExtensionField) error {
} }
for _, x := range *ext { for _, x := range *ext {
ei := getExtensionFieldInfo(x.Type()) ei := getExtensionFieldInfo(x.Type())
if ei.funcs.isInit == nil { if ei.funcs.isInit == nil || x.isUnexpandedLazy() {
continue continue
} }
v := x.Value() v := x.Value()

View File

@ -99,6 +99,28 @@ func (f *ExtensionField) canLazy(xt protoreflect.ExtensionType) bool {
return false return false
} }
// isUnexpandedLazy returns true if the ExensionField is lazy and not
// yet expanded, which means it's present and already checked for
// initialized required fields.
func (f *ExtensionField) isUnexpandedLazy() bool {
return f.lazy != nil && atomic.LoadUint32(&f.lazy.atomicOnce) == 0
}
// lazyBuffer retrieves the buffer for a lazy extension if it's not yet expanded.
//
// The returned buffer has to be kept over whatever operation we're planning,
// as re-retrieving it will fail after the message is lazily decoded.
func (f *ExtensionField) lazyBuffer() []byte {
// This function might be in the critical path, so check the atomic without
// taking a look first, then only take the lock if needed.
if !f.isUnexpandedLazy() {
return nil
}
f.lazy.mu.Lock()
defer f.lazy.mu.Unlock()
return f.lazy.b
}
func (f *ExtensionField) lazyInit() { func (f *ExtensionField) lazyInit() {
f.lazy.mu.Lock() f.lazy.mu.Lock()
defer f.lazy.mu.Unlock() defer f.lazy.mu.Unlock()

View File

@ -26,6 +26,15 @@ func sizeMessageSet(mi *MessageInfo, p pointer, opts marshalOptions) (size int)
} }
num, _ := protowire.DecodeTag(xi.wiretag) num, _ := protowire.DecodeTag(xi.wiretag)
size += messageset.SizeField(num) size += messageset.SizeField(num)
if fullyLazyExtensions(opts) {
// Don't expand the extension, instead use the buffer to calculate size
if lb := x.lazyBuffer(); lb != nil {
// We got hold of the buffer, so it's still lazy.
// Don't count the tag size in the extension buffer, it's already added.
size += protowire.SizeTag(messageset.FieldMessage) + len(lb) - xi.tagsize
continue
}
}
size += xi.funcs.size(x.Value(), protowire.SizeTag(messageset.FieldMessage), opts) size += xi.funcs.size(x.Value(), protowire.SizeTag(messageset.FieldMessage), opts)
} }
@ -85,6 +94,19 @@ func marshalMessageSetField(mi *MessageInfo, b []byte, x ExtensionField, opts ma
xi := getExtensionFieldInfo(x.Type()) xi := getExtensionFieldInfo(x.Type())
num, _ := protowire.DecodeTag(xi.wiretag) num, _ := protowire.DecodeTag(xi.wiretag)
b = messageset.AppendFieldStart(b, num) b = messageset.AppendFieldStart(b, num)
if fullyLazyExtensions(opts) {
// Don't expand the extension if it's still in wire format, instead use the buffer content.
if lb := x.lazyBuffer(); lb != nil {
// The tag inside the lazy buffer is a different tag (the extension
// number), but what we need here is the tag for FieldMessage:
b = protowire.AppendVarint(b, protowire.EncodeTag(messageset.FieldMessage, protowire.BytesType))
b = append(b, lb[xi.tagsize:]...)
b = messageset.AppendFieldEnd(b)
return b, nil
}
}
b, err := xi.funcs.marshal(b, x.Value(), protowire.EncodeTag(messageset.FieldMessage, protowire.BytesType), opts) b, err := xi.funcs.marshal(b, x.Value(), protowire.EncodeTag(messageset.FieldMessage, protowire.BytesType), opts)
if err != nil { if err != nil {
return b, err return b, err

View File

@ -14,7 +14,7 @@ import (
// unwrapper unwraps the value to the underlying value. // unwrapper unwraps the value to the underlying value.
// This is implemented by List and Map. // This is implemented by List and Map.
type unwrapper interface { type unwrapper interface {
protoUnwrap() interface{} protoUnwrap() any
} }
// A Converter coverts to/from Go reflect.Value types and protobuf protoreflect.Value types. // A Converter coverts to/from Go reflect.Value types and protobuf protoreflect.Value types.

View File

@ -136,6 +136,6 @@ func (ls *listReflect) NewElement() protoreflect.Value {
func (ls *listReflect) IsValid() bool { func (ls *listReflect) IsValid() bool {
return !ls.v.IsNil() return !ls.v.IsNil()
} }
func (ls *listReflect) protoUnwrap() interface{} { func (ls *listReflect) protoUnwrap() any {
return ls.v.Interface() return ls.v.Interface()
} }

View File

@ -116,6 +116,6 @@ func (ms *mapReflect) NewValue() protoreflect.Value {
func (ms *mapReflect) IsValid() bool { func (ms *mapReflect) IsValid() bool {
return !ms.v.IsNil() return !ms.v.IsNil()
} }
func (ms *mapReflect) protoUnwrap() interface{} { func (ms *mapReflect) protoUnwrap() any {
return ms.v.Interface() return ms.v.Interface()
} }

View File

@ -49,8 +49,11 @@ func (mi *MessageInfo) sizePointer(p pointer, opts marshalOptions) (size int) {
return 0 return 0
} }
if opts.UseCachedSize() && mi.sizecacheOffset.IsValid() { if opts.UseCachedSize() && mi.sizecacheOffset.IsValid() {
if size := atomic.LoadInt32(p.Apply(mi.sizecacheOffset).Int32()); size >= 0 { // The size cache contains the size + 1, to allow the
return int(size) // zero value to be invalid, while also allowing for a
// 0 size to be cached.
if size := atomic.LoadInt32(p.Apply(mi.sizecacheOffset).Int32()); size > 0 {
return int(size - 1)
} }
} }
return mi.sizePointerSlow(p, opts) return mi.sizePointerSlow(p, opts)
@ -60,7 +63,7 @@ func (mi *MessageInfo) sizePointerSlow(p pointer, opts marshalOptions) (size int
if flags.ProtoLegacy && mi.isMessageSet { if flags.ProtoLegacy && mi.isMessageSet {
size = sizeMessageSet(mi, p, opts) size = sizeMessageSet(mi, p, opts)
if mi.sizecacheOffset.IsValid() { if mi.sizecacheOffset.IsValid() {
atomic.StoreInt32(p.Apply(mi.sizecacheOffset).Int32(), int32(size)) atomic.StoreInt32(p.Apply(mi.sizecacheOffset).Int32(), int32(size+1))
} }
return size return size
} }
@ -84,13 +87,16 @@ func (mi *MessageInfo) sizePointerSlow(p pointer, opts marshalOptions) (size int
} }
} }
if mi.sizecacheOffset.IsValid() { if mi.sizecacheOffset.IsValid() {
if size > math.MaxInt32 { if size > (math.MaxInt32 - 1) {
// The size is too large for the int32 sizecache field. // The size is too large for the int32 sizecache field.
// We will need to recompute the size when encoding; // We will need to recompute the size when encoding;
// unfortunately expensive, but better than invalid output. // unfortunately expensive, but better than invalid output.
atomic.StoreInt32(p.Apply(mi.sizecacheOffset).Int32(), -1) atomic.StoreInt32(p.Apply(mi.sizecacheOffset).Int32(), 0)
} else { } else {
atomic.StoreInt32(p.Apply(mi.sizecacheOffset).Int32(), int32(size)) // The size cache contains the size + 1, to allow the
// zero value to be invalid, while also allowing for a
// 0 size to be cached.
atomic.StoreInt32(p.Apply(mi.sizecacheOffset).Int32(), int32(size+1))
} }
} }
return size return size
@ -149,6 +155,14 @@ func (mi *MessageInfo) marshalAppendPointer(b []byte, p pointer, opts marshalOpt
return b, nil return b, nil
} }
// fullyLazyExtensions returns true if we should attempt to keep extensions lazy over size and marshal.
func fullyLazyExtensions(opts marshalOptions) bool {
// When deterministic marshaling is requested, force an unmarshal for lazy
// extensions to produce a deterministic result, instead of passing through
// bytes lazily that may or may not match what Go Protobuf would produce.
return opts.flags&piface.MarshalDeterministic == 0
}
func (mi *MessageInfo) sizeExtensions(ext *map[int32]ExtensionField, opts marshalOptions) (n int) { func (mi *MessageInfo) sizeExtensions(ext *map[int32]ExtensionField, opts marshalOptions) (n int) {
if ext == nil { if ext == nil {
return 0 return 0
@ -158,6 +172,14 @@ func (mi *MessageInfo) sizeExtensions(ext *map[int32]ExtensionField, opts marsha
if xi.funcs.size == nil { if xi.funcs.size == nil {
continue continue
} }
if fullyLazyExtensions(opts) {
// Don't expand the extension, instead use the buffer to calculate size
if lb := x.lazyBuffer(); lb != nil {
// We got hold of the buffer, so it's still lazy.
n += len(lb)
continue
}
}
n += xi.funcs.size(x.Value(), xi.tagsize, opts) n += xi.funcs.size(x.Value(), xi.tagsize, opts)
} }
return n return n
@ -176,6 +198,13 @@ func (mi *MessageInfo) appendExtensions(b []byte, ext *map[int32]ExtensionField,
var err error var err error
for _, x := range *ext { for _, x := range *ext {
xi := getExtensionFieldInfo(x.Type()) xi := getExtensionFieldInfo(x.Type())
if fullyLazyExtensions(opts) {
// Don't expand the extension if it's still in wire format, instead use the buffer content.
if lb := x.lazyBuffer(); lb != nil {
b = append(b, lb...)
continue
}
}
b, err = xi.funcs.marshal(b, x.Value(), xi.wiretag, opts) b, err = xi.funcs.marshal(b, x.Value(), xi.wiretag, opts)
} }
return b, err return b, err
@ -191,6 +220,13 @@ func (mi *MessageInfo) appendExtensions(b []byte, ext *map[int32]ExtensionField,
for _, k := range keys { for _, k := range keys {
x := (*ext)[int32(k)] x := (*ext)[int32(k)]
xi := getExtensionFieldInfo(x.Type()) xi := getExtensionFieldInfo(x.Type())
if fullyLazyExtensions(opts) {
// Don't expand the extension if it's still in wire format, instead use the buffer content.
if lb := x.lazyBuffer(); lb != nil {
b = append(b, lb...)
continue
}
}
b, err = xi.funcs.marshal(b, x.Value(), xi.wiretag, opts) b, err = xi.funcs.marshal(b, x.Value(), xi.wiretag, opts)
if err != nil { if err != nil {
return b, err return b, err

View File

@ -53,7 +53,7 @@ type ExtensionInfo struct {
// type returned by InterfaceOf may not be identical. // type returned by InterfaceOf may not be identical.
// //
// Deprecated: Use InterfaceOf(xt.Zero()) instead. // Deprecated: Use InterfaceOf(xt.Zero()) instead.
ExtensionType interface{} ExtensionType any
// Field is the field number of the extension. // Field is the field number of the extension.
// //
@ -95,16 +95,16 @@ func (xi *ExtensionInfo) New() protoreflect.Value {
func (xi *ExtensionInfo) Zero() protoreflect.Value { func (xi *ExtensionInfo) Zero() protoreflect.Value {
return xi.lazyInit().Zero() return xi.lazyInit().Zero()
} }
func (xi *ExtensionInfo) ValueOf(v interface{}) protoreflect.Value { func (xi *ExtensionInfo) ValueOf(v any) protoreflect.Value {
return xi.lazyInit().PBValueOf(reflect.ValueOf(v)) return xi.lazyInit().PBValueOf(reflect.ValueOf(v))
} }
func (xi *ExtensionInfo) InterfaceOf(v protoreflect.Value) interface{} { func (xi *ExtensionInfo) InterfaceOf(v protoreflect.Value) any {
return xi.lazyInit().GoValueOf(v).Interface() return xi.lazyInit().GoValueOf(v).Interface()
} }
func (xi *ExtensionInfo) IsValidValue(v protoreflect.Value) bool { func (xi *ExtensionInfo) IsValidValue(v protoreflect.Value) bool {
return xi.lazyInit().IsValidPB(v) return xi.lazyInit().IsValidPB(v)
} }
func (xi *ExtensionInfo) IsValidInterface(v interface{}) bool { func (xi *ExtensionInfo) IsValidInterface(v any) bool {
return xi.lazyInit().IsValidGo(reflect.ValueOf(v)) return xi.lazyInit().IsValidGo(reflect.ValueOf(v))
} }
func (xi *ExtensionInfo) TypeDescriptor() protoreflect.ExtensionTypeDescriptor { func (xi *ExtensionInfo) TypeDescriptor() protoreflect.ExtensionTypeDescriptor {

View File

@ -97,7 +97,7 @@ func (e *legacyEnumWrapper) Number() protoreflect.EnumNumber {
func (e *legacyEnumWrapper) ProtoReflect() protoreflect.Enum { func (e *legacyEnumWrapper) ProtoReflect() protoreflect.Enum {
return e return e
} }
func (e *legacyEnumWrapper) protoUnwrap() interface{} { func (e *legacyEnumWrapper) protoUnwrap() any {
v := reflect.New(e.goTyp).Elem() v := reflect.New(e.goTyp).Elem()
v.SetInt(int64(e.num)) v.SetInt(int64(e.num))
return v.Interface() return v.Interface()

View File

@ -216,7 +216,7 @@ func aberrantLoadMessageDescReentrant(t reflect.Type, name protoreflect.FullName
} }
for _, fn := range methods { for _, fn := range methods {
for _, v := range fn.Func.Call([]reflect.Value{reflect.Zero(fn.Type.In(0))}) { for _, v := range fn.Func.Call([]reflect.Value{reflect.Zero(fn.Type.In(0))}) {
if vs, ok := v.Interface().([]interface{}); ok { if vs, ok := v.Interface().([]any); ok {
for _, v := range vs { for _, v := range vs {
oneofWrappers = append(oneofWrappers, reflect.TypeOf(v)) oneofWrappers = append(oneofWrappers, reflect.TypeOf(v))
} }
@ -567,6 +567,6 @@ func (m aberrantMessage) IsValid() bool {
func (m aberrantMessage) ProtoMethods() *protoiface.Methods { func (m aberrantMessage) ProtoMethods() *protoiface.Methods {
return aberrantProtoMethods return aberrantProtoMethods
} }
func (m aberrantMessage) protoUnwrap() interface{} { func (m aberrantMessage) protoUnwrap() any {
return m.v.Interface() return m.v.Interface()
} }

View File

@ -35,7 +35,7 @@ type MessageInfo struct {
Exporter exporter Exporter exporter
// OneofWrappers is list of pointers to oneof wrapper struct types. // OneofWrappers is list of pointers to oneof wrapper struct types.
OneofWrappers []interface{} OneofWrappers []any
initMu sync.Mutex // protects all unexported fields initMu sync.Mutex // protects all unexported fields
initDone uint32 initDone uint32
@ -47,7 +47,7 @@ type MessageInfo struct {
// exporter is a function that returns a reference to the ith field of v, // exporter is a function that returns a reference to the ith field of v,
// where v is a pointer to a struct. It returns nil if it does not support // where v is a pointer to a struct. It returns nil if it does not support
// exporting the requested field (e.g., already exported). // exporting the requested field (e.g., already exported).
type exporter func(v interface{}, i int) interface{} type exporter func(v any, i int) any
// getMessageInfo returns the MessageInfo for any message type that // getMessageInfo returns the MessageInfo for any message type that
// is generated by our implementation of protoc-gen-go (for v2 and on). // is generated by our implementation of protoc-gen-go (for v2 and on).
@ -201,7 +201,7 @@ fieldLoop:
} }
for _, fn := range methods { for _, fn := range methods {
for _, v := range fn.Func.Call([]reflect.Value{reflect.Zero(fn.Type.In(0))}) { for _, v := range fn.Func.Call([]reflect.Value{reflect.Zero(fn.Type.In(0))}) {
if vs, ok := v.Interface().([]interface{}); ok { if vs, ok := v.Interface().([]any); ok {
oneofWrappers = vs oneofWrappers = vs
} }
} }
@ -256,7 +256,7 @@ func (mi *MessageInfo) Message(i int) protoreflect.MessageType {
type mapEntryType struct { type mapEntryType struct {
desc protoreflect.MessageDescriptor desc protoreflect.MessageDescriptor
valType interface{} // zero value of enum or message type valType any // zero value of enum or message type
} }
func (mt mapEntryType) New() protoreflect.Message { func (mt mapEntryType) New() protoreflect.Message {

View File

@ -20,7 +20,7 @@ type reflectMessageInfo struct {
// fieldTypes contains the zero value of an enum or message field. // fieldTypes contains the zero value of an enum or message field.
// For lists, it contains the element type. // For lists, it contains the element type.
// For maps, it contains the entry value type. // For maps, it contains the entry value type.
fieldTypes map[protoreflect.FieldNumber]interface{} fieldTypes map[protoreflect.FieldNumber]any
// denseFields is a subset of fields where: // denseFields is a subset of fields where:
// 0 < fieldDesc.Number() < len(denseFields) // 0 < fieldDesc.Number() < len(denseFields)
@ -28,7 +28,7 @@ type reflectMessageInfo struct {
denseFields []*fieldInfo denseFields []*fieldInfo
// rangeInfos is a list of all fields (not belonging to a oneof) and oneofs. // rangeInfos is a list of all fields (not belonging to a oneof) and oneofs.
rangeInfos []interface{} // either *fieldInfo or *oneofInfo rangeInfos []any // either *fieldInfo or *oneofInfo
getUnknown func(pointer) protoreflect.RawFields getUnknown func(pointer) protoreflect.RawFields
setUnknown func(pointer, protoreflect.RawFields) setUnknown func(pointer, protoreflect.RawFields)
@ -224,7 +224,7 @@ func (mi *MessageInfo) makeFieldTypes(si structInfo) {
} }
if ft != nil { if ft != nil {
if mi.fieldTypes == nil { if mi.fieldTypes == nil {
mi.fieldTypes = make(map[protoreflect.FieldNumber]interface{}) mi.fieldTypes = make(map[protoreflect.FieldNumber]any)
} }
mi.fieldTypes[fd.Number()] = reflect.Zero(ft).Interface() mi.fieldTypes[fd.Number()] = reflect.Zero(ft).Interface()
} }
@ -255,6 +255,10 @@ func (m *extensionMap) Has(xd protoreflect.ExtensionTypeDescriptor) (ok bool) {
if !ok { if !ok {
return false return false
} }
if x.isUnexpandedLazy() {
// Avoid calling x.Value(), which triggers a lazy unmarshal.
return true
}
switch { switch {
case xd.IsList(): case xd.IsList():
return x.Value().List().Len() > 0 return x.Value().List().Len() > 0
@ -389,7 +393,7 @@ var (
// MessageOf returns a reflective view over a message. The input must be a // MessageOf returns a reflective view over a message. The input must be a
// pointer to a named Go struct. If the provided type has a ProtoReflect method, // pointer to a named Go struct. If the provided type has a ProtoReflect method,
// it must be implemented by calling this method. // it must be implemented by calling this method.
func (mi *MessageInfo) MessageOf(m interface{}) protoreflect.Message { func (mi *MessageInfo) MessageOf(m any) protoreflect.Message {
if reflect.TypeOf(m) != mi.GoReflectType { if reflect.TypeOf(m) != mi.GoReflectType {
panic(fmt.Sprintf("type mismatch: got %T, want %v", m, mi.GoReflectType)) panic(fmt.Sprintf("type mismatch: got %T, want %v", m, mi.GoReflectType))
} }
@ -417,7 +421,7 @@ func (m *messageIfaceWrapper) Reset() {
func (m *messageIfaceWrapper) ProtoReflect() protoreflect.Message { func (m *messageIfaceWrapper) ProtoReflect() protoreflect.Message {
return (*messageReflectWrapper)(m) return (*messageReflectWrapper)(m)
} }
func (m *messageIfaceWrapper) protoUnwrap() interface{} { func (m *messageIfaceWrapper) protoUnwrap() any {
return m.p.AsIfaceOf(m.mi.GoReflectType.Elem()) return m.p.AsIfaceOf(m.mi.GoReflectType.Elem())
} }

View File

@ -23,7 +23,7 @@ func (m *messageState) New() protoreflect.Message {
func (m *messageState) Interface() protoreflect.ProtoMessage { func (m *messageState) Interface() protoreflect.ProtoMessage {
return m.protoUnwrap().(protoreflect.ProtoMessage) return m.protoUnwrap().(protoreflect.ProtoMessage)
} }
func (m *messageState) protoUnwrap() interface{} { func (m *messageState) protoUnwrap() any {
return m.pointer().AsIfaceOf(m.messageInfo().GoReflectType.Elem()) return m.pointer().AsIfaceOf(m.messageInfo().GoReflectType.Elem())
} }
func (m *messageState) ProtoMethods() *protoiface.Methods { func (m *messageState) ProtoMethods() *protoiface.Methods {
@ -154,7 +154,7 @@ func (m *messageReflectWrapper) Interface() protoreflect.ProtoMessage {
} }
return (*messageIfaceWrapper)(m) return (*messageIfaceWrapper)(m)
} }
func (m *messageReflectWrapper) protoUnwrap() interface{} { func (m *messageReflectWrapper) protoUnwrap() any {
return m.pointer().AsIfaceOf(m.messageInfo().GoReflectType.Elem()) return m.pointer().AsIfaceOf(m.messageInfo().GoReflectType.Elem())
} }
func (m *messageReflectWrapper) ProtoMethods() *protoiface.Methods { func (m *messageReflectWrapper) ProtoMethods() *protoiface.Methods {

View File

@ -16,7 +16,7 @@ import (
const UnsafeEnabled = false const UnsafeEnabled = false
// Pointer is an opaque pointer type. // Pointer is an opaque pointer type.
type Pointer interface{} type Pointer any
// offset represents the offset to a struct field, accessible from a pointer. // offset represents the offset to a struct field, accessible from a pointer.
// The offset is the field index into a struct. // The offset is the field index into a struct.
@ -62,7 +62,7 @@ func pointerOfValue(v reflect.Value) pointer {
} }
// pointerOfIface returns the pointer portion of an interface. // pointerOfIface returns the pointer portion of an interface.
func pointerOfIface(v interface{}) pointer { func pointerOfIface(v any) pointer {
return pointer{v: reflect.ValueOf(v)} return pointer{v: reflect.ValueOf(v)}
} }
@ -93,7 +93,7 @@ func (p pointer) AsValueOf(t reflect.Type) reflect.Value {
// AsIfaceOf treats p as a pointer to an object of type t and returns the value. // AsIfaceOf treats p as a pointer to an object of type t and returns the value.
// It is equivalent to p.AsValueOf(t).Interface() // It is equivalent to p.AsValueOf(t).Interface()
func (p pointer) AsIfaceOf(t reflect.Type) interface{} { func (p pointer) AsIfaceOf(t reflect.Type) any {
return p.AsValueOf(t).Interface() return p.AsValueOf(t).Interface()
} }

View File

@ -50,7 +50,7 @@ func pointerOfValue(v reflect.Value) pointer {
} }
// pointerOfIface returns the pointer portion of an interface. // pointerOfIface returns the pointer portion of an interface.
func pointerOfIface(v interface{}) pointer { func pointerOfIface(v any) pointer {
type ifaceHeader struct { type ifaceHeader struct {
Type unsafe.Pointer Type unsafe.Pointer
Data unsafe.Pointer Data unsafe.Pointer
@ -80,7 +80,7 @@ func (p pointer) AsValueOf(t reflect.Type) reflect.Value {
// AsIfaceOf treats p as a pointer to an object of type t and returns the value. // AsIfaceOf treats p as a pointer to an object of type t and returns the value.
// It is equivalent to p.AsValueOf(t).Interface() // It is equivalent to p.AsValueOf(t).Interface()
func (p pointer) AsIfaceOf(t reflect.Type) interface{} { func (p pointer) AsIfaceOf(t reflect.Type) any {
// TODO: Use tricky unsafe magic to directly create ifaceHeader. // TODO: Use tricky unsafe magic to directly create ifaceHeader.
return p.AsValueOf(t).Interface() return p.AsValueOf(t).Interface()
} }

View File

@ -18,7 +18,7 @@ type messageField struct {
} }
var messageFieldPool = sync.Pool{ var messageFieldPool = sync.Pool{
New: func() interface{} { return new([]messageField) }, New: func() any { return new([]messageField) },
} }
type ( type (
@ -69,7 +69,7 @@ type mapEntry struct {
} }
var mapEntryPool = sync.Pool{ var mapEntryPool = sync.Pool{
New: func() interface{} { return new([]mapEntry) }, New: func() any { return new([]mapEntry) },
} }
type ( type (

View File

@ -52,7 +52,7 @@ import (
const ( const (
Major = 1 Major = 1
Minor = 34 Minor = 34
Patch = 1 Patch = 2
PreRelease = "" PreRelease = ""
) )

View File

@ -39,7 +39,7 @@ func ClearExtension(m Message, xt protoreflect.ExtensionType) {
// If the field is unpopulated, it returns the default value for // If the field is unpopulated, it returns the default value for
// scalars and an immutable, empty value for lists or messages. // scalars and an immutable, empty value for lists or messages.
// It panics if xt does not extend m. // It panics if xt does not extend m.
func GetExtension(m Message, xt protoreflect.ExtensionType) interface{} { func GetExtension(m Message, xt protoreflect.ExtensionType) any {
// Treat nil message interface as an empty message; return the default. // Treat nil message interface as an empty message; return the default.
if m == nil { if m == nil {
return xt.InterfaceOf(xt.Zero()) return xt.InterfaceOf(xt.Zero())
@ -51,7 +51,7 @@ func GetExtension(m Message, xt protoreflect.ExtensionType) interface{} {
// SetExtension stores the value of an extension field. // SetExtension stores the value of an extension field.
// It panics if m is invalid, xt does not extend m, or if type of v // It panics if m is invalid, xt does not extend m, or if type of v
// is invalid for the specified extension field. // is invalid for the specified extension field.
func SetExtension(m Message, xt protoreflect.ExtensionType, v interface{}) { func SetExtension(m Message, xt protoreflect.ExtensionType, v any) {
xd := xt.TypeDescriptor() xd := xt.TypeDescriptor()
pv := xt.ValueOf(v) pv := xt.ValueOf(v)
@ -78,7 +78,7 @@ func SetExtension(m Message, xt protoreflect.ExtensionType, v interface{}) {
// It returns immediately if f returns false. // It returns immediately if f returns false.
// While iterating, mutating operations may only be performed // While iterating, mutating operations may only be performed
// on the current extension field. // on the current extension field.
func RangeExtensions(m Message, f func(protoreflect.ExtensionType, interface{}) bool) { func RangeExtensions(m Message, f func(protoreflect.ExtensionType, any) bool) {
// Treat nil message interface as an empty message; nothing to range over. // Treat nil message interface as an empty message; nothing to range over.
if m == nil { if m == nil {
return return

View File

@ -485,6 +485,8 @@ func (p *SourcePath) appendEnumValueOptions(b []byte) []byte {
b = p.appendSingularField(b, "features", (*SourcePath).appendFeatureSet) b = p.appendSingularField(b, "features", (*SourcePath).appendFeatureSet)
case 3: case 3:
b = p.appendSingularField(b, "debug_redact", nil) b = p.appendSingularField(b, "debug_redact", nil)
case 4:
b = p.appendSingularField(b, "feature_support", (*SourcePath).appendFieldOptions_FeatureSupport)
case 999: case 999:
b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption) b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption)
} }

View File

@ -510,7 +510,7 @@ type ExtensionType interface {
// //
// ValueOf is more extensive than protoreflect.ValueOf for a given field's // ValueOf is more extensive than protoreflect.ValueOf for a given field's
// value as it has more type information available. // value as it has more type information available.
ValueOf(interface{}) Value ValueOf(any) Value
// InterfaceOf completely unwraps the Value to the underlying Go type. // InterfaceOf completely unwraps the Value to the underlying Go type.
// InterfaceOf panics if the input is nil or does not represent the // InterfaceOf panics if the input is nil or does not represent the
@ -519,13 +519,13 @@ type ExtensionType interface {
// //
// InterfaceOf is able to unwrap the Value further than Value.Interface // InterfaceOf is able to unwrap the Value further than Value.Interface
// as it has more type information available. // as it has more type information available.
InterfaceOf(Value) interface{} InterfaceOf(Value) any
// IsValidValue reports whether the Value is valid to assign to the field. // IsValidValue reports whether the Value is valid to assign to the field.
IsValidValue(Value) bool IsValidValue(Value) bool
// IsValidInterface reports whether the input is valid to assign to the field. // IsValidInterface reports whether the input is valid to assign to the field.
IsValidInterface(interface{}) bool IsValidInterface(any) bool
} }
// EnumDescriptor describes an enum and // EnumDescriptor describes an enum and

View File

@ -32,11 +32,11 @@ const (
type value struct { type value struct {
pragma.DoNotCompare // 0B pragma.DoNotCompare // 0B
typ valueType // 8B typ valueType // 8B
num uint64 // 8B num uint64 // 8B
str string // 16B str string // 16B
bin []byte // 24B bin []byte // 24B
iface interface{} // 16B iface any // 16B
} }
func valueOfString(v string) Value { func valueOfString(v string) Value {
@ -45,7 +45,7 @@ func valueOfString(v string) Value {
func valueOfBytes(v []byte) Value { func valueOfBytes(v []byte) Value {
return Value{typ: bytesType, bin: v} return Value{typ: bytesType, bin: v}
} }
func valueOfIface(v interface{}) Value { func valueOfIface(v any) Value {
return Value{typ: ifaceType, iface: v} return Value{typ: ifaceType, iface: v}
} }
@ -55,6 +55,6 @@ func (v Value) getString() string {
func (v Value) getBytes() []byte { func (v Value) getBytes() []byte {
return v.bin return v.bin
} }
func (v Value) getIface() interface{} { func (v Value) getIface() any {
return v.iface return v.iface
} }

View File

@ -69,8 +69,8 @@ import (
// composite Value. Modifying an empty, read-only value panics. // composite Value. Modifying an empty, read-only value panics.
type Value value type Value value
// The protoreflect API uses a custom Value union type instead of interface{} // The protoreflect API uses a custom Value union type instead of any
// to keep the future open for performance optimizations. Using an interface{} // to keep the future open for performance optimizations. Using an any
// always incurs an allocation for primitives (e.g., int64) since it needs to // always incurs an allocation for primitives (e.g., int64) since it needs to
// be boxed on the heap (as interfaces can only contain pointers natively). // be boxed on the heap (as interfaces can only contain pointers natively).
// Instead, we represent the Value union as a flat struct that internally keeps // Instead, we represent the Value union as a flat struct that internally keeps
@ -85,7 +85,7 @@ type Value value
// ValueOf returns a Value initialized with the concrete value stored in v. // ValueOf returns a Value initialized with the concrete value stored in v.
// This panics if the type does not match one of the allowed types in the // This panics if the type does not match one of the allowed types in the
// Value union. // Value union.
func ValueOf(v interface{}) Value { func ValueOf(v any) Value {
switch v := v.(type) { switch v := v.(type) {
case nil: case nil:
return Value{} return Value{}
@ -192,10 +192,10 @@ func (v Value) IsValid() bool {
return v.typ != nilType return v.typ != nilType
} }
// Interface returns v as an interface{}. // Interface returns v as an any.
// //
// Invariant: v == ValueOf(v).Interface() // Invariant: v == ValueOf(v).Interface()
func (v Value) Interface() interface{} { func (v Value) Interface() any {
switch v.typ { switch v.typ {
case nilType: case nilType:
return nil return nil
@ -406,8 +406,8 @@ func (k MapKey) IsValid() bool {
return Value(k).IsValid() return Value(k).IsValid()
} }
// Interface returns k as an interface{}. // Interface returns k as an any.
func (k MapKey) Interface() interface{} { func (k MapKey) Interface() any {
return Value(k).Interface() return Value(k).Interface()
} }

View File

@ -45,7 +45,7 @@ var (
// typeOf returns a pointer to the Go type information. // typeOf returns a pointer to the Go type information.
// The pointer is comparable and equal if and only if the types are identical. // The pointer is comparable and equal if and only if the types are identical.
func typeOf(t interface{}) unsafe.Pointer { func typeOf(t any) unsafe.Pointer {
return (*ifaceHeader)(unsafe.Pointer(&t)).Type return (*ifaceHeader)(unsafe.Pointer(&t)).Type
} }
@ -80,7 +80,7 @@ func valueOfBytes(v []byte) Value {
p := (*sliceHeader)(unsafe.Pointer(&v)) p := (*sliceHeader)(unsafe.Pointer(&v))
return Value{typ: bytesType, ptr: p.Data, num: uint64(len(v))} return Value{typ: bytesType, ptr: p.Data, num: uint64(len(v))}
} }
func valueOfIface(v interface{}) Value { func valueOfIface(v any) Value {
p := (*ifaceHeader)(unsafe.Pointer(&v)) p := (*ifaceHeader)(unsafe.Pointer(&v))
return Value{typ: p.Type, ptr: p.Data} return Value{typ: p.Type, ptr: p.Data}
} }
@ -93,7 +93,7 @@ func (v Value) getBytes() (x []byte) {
*(*sliceHeader)(unsafe.Pointer(&x)) = sliceHeader{Data: v.ptr, Len: int(v.num), Cap: int(v.num)} *(*sliceHeader)(unsafe.Pointer(&x)) = sliceHeader{Data: v.ptr, Len: int(v.num), Cap: int(v.num)}
return x return x
} }
func (v Value) getIface() (x interface{}) { func (v Value) getIface() (x any) {
*(*ifaceHeader)(unsafe.Pointer(&x)) = ifaceHeader{Type: v.typ, Data: v.ptr} *(*ifaceHeader)(unsafe.Pointer(&x)) = ifaceHeader{Type: v.typ, Data: v.ptr}
return x return x
} }

View File

@ -15,7 +15,7 @@ import (
type ( type (
ifaceHeader struct { ifaceHeader struct {
_ [0]interface{} // if interfaces have greater alignment than unsafe.Pointer, this will enforce it. _ [0]any // if interfaces have greater alignment than unsafe.Pointer, this will enforce it.
Type unsafe.Pointer Type unsafe.Pointer
Data unsafe.Pointer Data unsafe.Pointer
} }
@ -37,7 +37,7 @@ var (
// typeOf returns a pointer to the Go type information. // typeOf returns a pointer to the Go type information.
// The pointer is comparable and equal if and only if the types are identical. // The pointer is comparable and equal if and only if the types are identical.
func typeOf(t interface{}) unsafe.Pointer { func typeOf(t any) unsafe.Pointer {
return (*ifaceHeader)(unsafe.Pointer(&t)).Type return (*ifaceHeader)(unsafe.Pointer(&t)).Type
} }
@ -70,7 +70,7 @@ func valueOfString(v string) Value {
func valueOfBytes(v []byte) Value { func valueOfBytes(v []byte) Value {
return Value{typ: bytesType, ptr: unsafe.Pointer(unsafe.SliceData(v)), num: uint64(len(v))} return Value{typ: bytesType, ptr: unsafe.Pointer(unsafe.SliceData(v)), num: uint64(len(v))}
} }
func valueOfIface(v interface{}) Value { func valueOfIface(v any) Value {
p := (*ifaceHeader)(unsafe.Pointer(&v)) p := (*ifaceHeader)(unsafe.Pointer(&v))
return Value{typ: p.Type, ptr: p.Data} return Value{typ: p.Type, ptr: p.Data}
} }
@ -81,7 +81,7 @@ func (v Value) getString() string {
func (v Value) getBytes() []byte { func (v Value) getBytes() []byte {
return unsafe.Slice((*byte)(v.ptr), v.num) return unsafe.Slice((*byte)(v.ptr), v.num)
} }
func (v Value) getIface() (x interface{}) { func (v Value) getIface() (x any) {
*(*ifaceHeader)(unsafe.Pointer(&x)) = ifaceHeader{Type: v.typ, Data: v.ptr} *(*ifaceHeader)(unsafe.Pointer(&x)) = ifaceHeader{Type: v.typ, Data: v.ptr}
return x return x
} }

View File

@ -95,7 +95,7 @@ type Files struct {
// multiple files. Only top-level declarations are registered. // multiple files. Only top-level declarations are registered.
// Note that enum values are in the top-level since that are in the same // Note that enum values are in the top-level since that are in the same
// scope as the parent enum. // scope as the parent enum.
descsByName map[protoreflect.FullName]interface{} descsByName map[protoreflect.FullName]any
filesByPath map[string][]protoreflect.FileDescriptor filesByPath map[string][]protoreflect.FileDescriptor
numFiles int numFiles int
} }
@ -117,7 +117,7 @@ func (r *Files) RegisterFile(file protoreflect.FileDescriptor) error {
defer globalMutex.Unlock() defer globalMutex.Unlock()
} }
if r.descsByName == nil { if r.descsByName == nil {
r.descsByName = map[protoreflect.FullName]interface{}{ r.descsByName = map[protoreflect.FullName]any{
"": &packageDescriptor{}, "": &packageDescriptor{},
} }
r.filesByPath = make(map[string][]protoreflect.FileDescriptor) r.filesByPath = make(map[string][]protoreflect.FileDescriptor)
@ -485,7 +485,7 @@ type Types struct {
} }
type ( type (
typesByName map[protoreflect.FullName]interface{} typesByName map[protoreflect.FullName]any
extensionsByMessage map[protoreflect.FullName]extensionsByNumber extensionsByMessage map[protoreflect.FullName]extensionsByNumber
extensionsByNumber map[protoreflect.FieldNumber]protoreflect.ExtensionType extensionsByNumber map[protoreflect.FieldNumber]protoreflect.ExtensionType
) )
@ -570,7 +570,7 @@ func (r *Types) RegisterExtension(xt protoreflect.ExtensionType) error {
return nil return nil
} }
func (r *Types) register(kind string, desc protoreflect.Descriptor, typ interface{}) error { func (r *Types) register(kind string, desc protoreflect.Descriptor, typ any) error {
name := desc.FullName() name := desc.FullName()
prev := r.typesByName[name] prev := r.typesByName[name]
if prev != nil { if prev != nil {
@ -841,7 +841,7 @@ func (r *Types) RangeExtensionsByMessage(message protoreflect.FullName, f func(p
} }
} }
func typeName(t interface{}) string { func typeName(t any) string {
switch t.(type) { switch t.(type) {
case protoreflect.EnumType: case protoreflect.EnumType:
return "enum" return "enum"
@ -854,7 +854,7 @@ func typeName(t interface{}) string {
} }
} }
func amendErrorWithCaller(err error, prev, curr interface{}) error { func amendErrorWithCaller(err error, prev, curr any) error {
prevPkg := goPackage(prev) prevPkg := goPackage(prev)
currPkg := goPackage(curr) currPkg := goPackage(curr)
if prevPkg == "" || currPkg == "" || prevPkg == currPkg { if prevPkg == "" || currPkg == "" || prevPkg == currPkg {
@ -863,7 +863,7 @@ func amendErrorWithCaller(err error, prev, curr interface{}) error {
return errors.New("%s\n\tpreviously from: %q\n\tcurrently from: %q", err, prevPkg, currPkg) return errors.New("%s\n\tpreviously from: %q\n\tcurrently from: %q", err, prevPkg, currPkg)
} }
func goPackage(v interface{}) string { func goPackage(v any) string {
switch d := v.(type) { switch d := v.(type) {
case protoreflect.EnumType: case protoreflect.EnumType:
v = d.Descriptor() v = d.Descriptor()

View File

@ -332,7 +332,7 @@ func file_google_protobuf_timestamp_proto_rawDescGZIP() []byte {
} }
var file_google_protobuf_timestamp_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_google_protobuf_timestamp_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_google_protobuf_timestamp_proto_goTypes = []interface{}{ var file_google_protobuf_timestamp_proto_goTypes = []any{
(*Timestamp)(nil), // 0: google.protobuf.Timestamp (*Timestamp)(nil), // 0: google.protobuf.Timestamp
} }
var file_google_protobuf_timestamp_proto_depIdxs = []int32{ var file_google_protobuf_timestamp_proto_depIdxs = []int32{
@ -349,7 +349,7 @@ func file_google_protobuf_timestamp_proto_init() {
return return
} }
if !protoimpl.UnsafeEnabled { if !protoimpl.UnsafeEnabled {
file_google_protobuf_timestamp_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { file_google_protobuf_timestamp_proto_msgTypes[0].Exporter = func(v any, i int) any {
switch v := v.(*Timestamp); i { switch v := v.(*Timestamp); i {
case 0: case 0:
return &v.state return &v.state

View File

@ -19,12 +19,12 @@ github.com/gogo/protobuf/protoc-gen-gogo/descriptor
# github.com/gorilla/mux v1.8.1 # github.com/gorilla/mux v1.8.1
## explicit; go 1.20 ## explicit; go 1.20
github.com/gorilla/mux github.com/gorilla/mux
# github.com/klauspost/compress v1.17.8 # github.com/klauspost/compress v1.17.9
## explicit; go 1.20 ## explicit; go 1.20
github.com/klauspost/compress/flate github.com/klauspost/compress/flate
# github.com/matttproud/golang_protobuf_extensions v1.0.4 # github.com/matttproud/golang_protobuf_extensions v1.0.4
## explicit; go 1.9 ## explicit; go 1.9
# github.com/nats-io/nats.go v1.35.0 # github.com/nats-io/nats.go v1.36.0
## explicit; go 1.20 ## explicit; go 1.20
github.com/nats-io/nats.go github.com/nats-io/nats.go
github.com/nats-io/nats.go/encoders/builtin github.com/nats-io/nats.go/encoders/builtin
@ -61,7 +61,7 @@ github.com/prometheus/client_golang/prometheus/promhttp
# github.com/prometheus/client_model v0.6.1 # github.com/prometheus/client_model v0.6.1
## explicit; go 1.19 ## explicit; go 1.19
github.com/prometheus/client_model/go github.com/prometheus/client_model/go
# github.com/prometheus/common v0.53.0 # github.com/prometheus/common v0.54.0
## explicit; go 1.20 ## explicit; go 1.20
github.com/prometheus/common/expfmt github.com/prometheus/common/expfmt
github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg
@ -77,7 +77,7 @@ github.com/prometheus/procfs/internal/util
## explicit; go 1.20 ## explicit; go 1.20
go.uber.org/goleak go.uber.org/goleak
go.uber.org/goleak/internal/stack go.uber.org/goleak/internal/stack
# golang.org/x/crypto v0.23.0 # golang.org/x/crypto v0.24.0
## explicit; go 1.18 ## explicit; go 1.18
golang.org/x/crypto/blake2b golang.org/x/crypto/blake2b
golang.org/x/crypto/curve25519 golang.org/x/crypto/curve25519
@ -91,13 +91,13 @@ golang.org/x/crypto/salsa20/salsa
# golang.org/x/sync v0.7.0 # golang.org/x/sync v0.7.0
## explicit; go 1.18 ## explicit; go 1.18
golang.org/x/sync/singleflight golang.org/x/sync/singleflight
# golang.org/x/sys v0.20.0 # golang.org/x/sys v0.21.0
## explicit; go 1.18 ## explicit; go 1.18
golang.org/x/sys/cpu golang.org/x/sys/cpu
golang.org/x/sys/unix golang.org/x/sys/unix
golang.org/x/sys/windows golang.org/x/sys/windows
# google.golang.org/protobuf v1.34.1 # google.golang.org/protobuf v1.34.2
## explicit; go 1.17 ## explicit; go 1.20
google.golang.org/protobuf/encoding/protodelim google.golang.org/protobuf/encoding/protodelim
google.golang.org/protobuf/encoding/prototext google.golang.org/protobuf/encoding/prototext
google.golang.org/protobuf/encoding/protowire google.golang.org/protobuf/encoding/protowire